From fda6e353d51d42ec2d9e601dc63b82df892628de Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Tue, 8 Oct 2024 20:18:27 +0400 Subject: [PATCH] fix: in-memory trie updates pruning (#11580) Co-authored-by: Matthias Seitz --- crates/engine/tree/src/tree/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 47be69a3de..fd3f2df5c0 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -282,7 +282,7 @@ impl TreeState { } // remove trie updates that are below the finalized block - self.persisted_trie_updates.retain(|_, (block_num, _)| *block_num < finalized_num); + self.persisted_trie_updates.retain(|_, (block_num, _)| *block_num > finalized_num); // The only block that should remain at the `finalized` number now, is the finalized // block, if it exists.