From 67478ba779e851f0aff3945b407a6d18d46a1119 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Thu, 16 Mar 2023 11:21:52 +0200 Subject: [PATCH] fix(tree): vis of unwind block indices (#1786) --- crates/executor/src/blockchain_tree/block_indices.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/executor/src/blockchain_tree/block_indices.rs b/crates/executor/src/blockchain_tree/block_indices.rs index 24eebff116..7362316d32 100644 --- a/crates/executor/src/blockchain_tree/block_indices.rs +++ b/crates/executor/src/blockchain_tree/block_indices.rs @@ -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); }