mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(tree): vis of unwind block indices (#1786)
This commit is contained in:
@ -247,7 +247,7 @@ impl BlockIndices {
|
||||
/// NOTE: This is not safe standalone, as it will not disconnect
|
||||
/// blocks that deppends on unwinded canonical chain. And should be
|
||||
/// used when canonical chain is reinserted inside Tree.
|
||||
fn unwind_canonical_chain(&mut self, unwind_to: BlockNumber) {
|
||||
pub(crate) fn unwind_canonical_chain(&mut self, unwind_to: BlockNumber) {
|
||||
// this will remove all blocks numbers that are going to be replaced.
|
||||
self.canonical_chain.retain(|num, _| *num <= unwind_to);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user