fix: use parent hash for chain traversal (#9790)

This commit is contained in:
Matthias Seitz
2024-07-25 11:15:18 +02:00
committed by GitHub
parent c34f344cb0
commit e230517409

View File

@@ -166,7 +166,7 @@ impl TreeState {
// we have a reorg
todo!("handle reorg")
}
let parent_block = self.blocks_by_hash.get(&new_head).cloned()?;
let parent_block = self.blocks_by_hash.get(&parent.hash).cloned()?;
parent = parent_block.block.num_hash();
new_chain.push(parent_block);
}