mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: check hashed state for loading TriePrefixSets::destroyed_accounts (#12235)
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user