todo for shorter reorgs

This commit is contained in:
NikVolf 2016-11-07 13:26:51 +03:00
parent 679b83ecd0
commit 9f7dcb6816
1 changed files with 1 additions and 0 deletions

View File

@ -410,6 +410,7 @@ impl Storage {
let (at_height, route) = try!(self.fork_route(MAX_FORK_ROUTE_PRESET, hash));
// reorganization is performed only if length of side chain is at least the same as main chain
// todo: shorter chain may actualy become canonical during difficulty updates, though with rather low probability
if (route.len() as i32 + 1) < (self.best_number().unwrap_or(0) as i32 - at_height as i32) {
return Ok(None);
}