diff --git a/sync/src/synchronization_chain.rs b/sync/src/synchronization_chain.rs index 7832c8b5..0efb6dd1 100644 --- a/sync/src/synchronization_chain.rs +++ b/sync/src/synchronization_chain.rs @@ -310,7 +310,7 @@ impl Chain { /// Insert new best block to storage pub fn insert_best_block(&mut self, hash: H256, block: &IndexedBlock) -> Result { - let is_appending_to_main_branch = &self.best_storage_block.hash == block.hash(); + let is_appending_to_main_branch = self.best_storage_block.hash == block.header().previous_header_hash; // insert to storage let storage_insertion = try!(self.storage.insert_indexed_block(&block));