From 433d4d992fecef280b5349f1d6785570bb3b5bf0 Mon Sep 17 00:00:00 2001 From: Rami <2418646+hashcashier@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:44:30 +0200 Subject: [PATCH] fix(mpt): Remove unnused collapse (#808) --- crates/mpt/src/node.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/mpt/src/node.rs b/crates/mpt/src/node.rs index cb125d453..d21a6fec5 100644 --- a/crates/mpt/src/node.rs +++ b/crates/mpt/src/node.rs @@ -432,11 +432,10 @@ impl TrieNode { // If the child node is empty, convert the extension into an empty node. *self = Self::Empty; } - Self::Blinded { .. } => { - node.unblind(fetcher)?; - self.collapse_if_possible(fetcher, hinter)?; + _ => { + // If the child is a (blinded?) branch then no need for collapse + // because deletion did not collapse the (blinded?) branch } - _ => {} }, Self::Branch { stack } => { // Count non-empty children