mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(tree): log error on unreachable (#4185)
This commit is contained in:
@ -972,6 +972,12 @@ impl<DB: Database, C: Consensus, EF: ExecutorFactory> BlockchainTree<DB, C, EF>
|
||||
let canon_fork: BlockNumHash = new_canon_chain.fork_block();
|
||||
// sanity check
|
||||
if self.block_indices.canonical_hash(&canon_fork.number) != Some(canon_fork.hash) {
|
||||
error!(
|
||||
target: "blockchain_tree",
|
||||
?canon_fork,
|
||||
?self.block_indices,
|
||||
"All chains should point to canonical chain"
|
||||
);
|
||||
unreachable!("all chains should point to canonical chain.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user