Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions crates/storage/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ impl Store {
let Some(state_trie) = self.state_trie(block_hash)? else {
return Ok(None);
};
get_account_state_from_trie(&state_trie, address)
self.get_account_state_from_trie(&state_trie, address)
}

pub fn get_account_state_by_root(
Expand Down Expand Up @@ -1383,17 +1383,6 @@ pub struct StorageSlotProof {
pub value: U256,
}

fn get_account_state_from_trie(
state_trie: &Trie,
address: Address,
) -> Result<Option<AccountState>, StoreError> {
let hashed_address = hash_address(&address);
let Some(encoded_state) = state_trie.get(&hashed_address)? else {
return Ok(None);
};
Ok(Some(AccountState::decode(&encoded_state)?))
}

pub struct AncestorIterator {
store: Store,
next_hash: BlockHash,
Expand Down