Skip to content

Commit

Permalink
hashed state
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Oct 31, 2024
1 parent 2e750f0 commit 34ab39b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/trie/db/src/prefix_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ impl<TX: DbTx> PrefixSetLoader<'_, TX> {

// Walk account changeset and insert account prefixes.
let mut account_changeset_cursor = self.cursor_read::<tables::AccountChangeSets>()?;
let mut account_plain_state_cursor = self.cursor_read::<tables::PlainAccountState>()?;
let mut account_hashed_state_cursor = self.cursor_read::<tables::HashedAccounts>()?;
for account_entry in account_changeset_cursor.walk_range(range.clone())? {
let (_, AccountBeforeTx { address, .. }) = account_entry?;
let hashed_address = keccak256(address);
account_prefix_set.insert(Nibbles::unpack(hashed_address));

if account_plain_state_cursor.seek_exact(address)?.is_none() {
if account_hashed_state_cursor.seek_exact(hashed_address)?.is_none() {
destroyed_accounts.insert(hashed_address);
}
}
Expand Down

0 comments on commit 34ab39b

Please sign in to comment.