From 2cbf1f3ddc9b816a9587017de9f55cc75960fc9e Mon Sep 17 00:00:00 2001 From: carneiro-cw <156914855+carneiro-cw@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:55:46 -0300 Subject: [PATCH] enha: don't insert during prepare_batch_with_execution_changes (#1767) --- src/eth/storage/rocks/rocks_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eth/storage/rocks/rocks_state.rs b/src/eth/storage/rocks/rocks_state.rs index 3cd49fe53..3b71e8fe8 100644 --- a/src/eth/storage/rocks/rocks_state.rs +++ b/src/eth/storage/rocks/rocks_state.rs @@ -194,7 +194,7 @@ impl RocksStorageState { if change.is_account_modified() { let address: AddressRocksdb = change.address.into(); - let mut account_info_entry = self.accounts.get_or_insert_with(address, || AccountRocksdb::default().into())?; + let mut account_info_entry = self.accounts.get(&address)?.unwrap_or(AccountRocksdb::default().into()); if let Some(nonce) = change.nonce.take_modified() { account_info_entry.nonce = nonce.into();