From a1f7f54ab511fb767836c79ffe5aa1b663108b7a Mon Sep 17 00:00:00 2001 From: rakita Date: Mon, 13 Feb 2023 20:06:56 +0100 Subject: [PATCH] bug: wipe storage only on selfdestruct (#1319) --- crates/executor/src/executor.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/executor/src/executor.rs b/crates/executor/src/executor.rs index e3985e8208..e4c60e2651 100644 --- a/crates/executor/src/executor.rs +++ b/crates/executor/src/executor.rs @@ -175,11 +175,8 @@ where } }; - let mut wipe_storage = false; - new_account.account_state = if account.storage_cleared { new_account.storage.clear(); - wipe_storage = true; AccountState::StorageCleared } else { AccountState::Touched @@ -197,7 +194,11 @@ where // Insert into change. change.insert( address, - AccountChangeSet { account: account_info_changeset, storage, wipe_storage }, + AccountChangeSet { + account: account_info_changeset, + storage, + wipe_storage: false, + }, ); } }