Skip to content

Commit

Permalink
enha: don't insert during prepare_batch_with_execution_changes (#1767)
Browse files Browse the repository at this point in the history
  • Loading branch information
carneiro-cw authored Oct 14, 2024
1 parent c7cb308 commit 2cbf1f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eth/storage/rocks/rocks_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2cbf1f3

Please sign in to comment.