From e29b4eec482d6762a44df9782317f7e531867f6d Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Fri, 6 Dec 2024 14:02:03 +0000 Subject: [PATCH] fix(trie): delete self destructed accounts from sparse trie (#13168) --- crates/engine/tree/src/tree/root.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engine/tree/src/tree/root.rs b/crates/engine/tree/src/tree/root.rs index bb936c28341d..2d00feba50d4 100644 --- a/crates/engine/tree/src/tree/root.rs +++ b/crates/engine/tree/src/tree/root.rs @@ -265,7 +265,7 @@ where trace!(target: "engine::root", ?address, ?hashed_address, "Adding account to state update"); let destroyed = account.is_selfdestructed(); - let info = if account.is_empty() { None } else { Some(account.info.into()) }; + let info = if destroyed { None } else { Some(account.info.into()) }; hashed_state_update.accounts.insert(hashed_address, info); let mut changed_storage_iter = account