mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use shorter map names (#14445)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use crate::{DatabaseHashedCursorFactory, DatabaseTrieCursorFactory, PrefixSetLoader};
|
||||
use alloy_primitives::{
|
||||
map::{AddressHashMap, B256HashMap},
|
||||
map::{AddressMap, B256Map},
|
||||
Address, BlockNumber, B256, U256,
|
||||
};
|
||||
use reth_db::tables;
|
||||
@ -230,7 +230,7 @@ impl<TX: DbTx> DatabaseHashedPostState<TX> for HashedPostState {
|
||||
}
|
||||
|
||||
// Iterate over storage changesets and record value before first occurring storage change.
|
||||
let mut storages = AddressHashMap::<B256HashMap<U256>>::default();
|
||||
let mut storages = AddressMap::<B256Map<U256>>::default();
|
||||
let mut storage_changesets_cursor = tx.cursor_read::<tables::StorageChangeSets>()?;
|
||||
for entry in
|
||||
storage_changesets_cursor.walk_range(BlockNumberAddress((from, Address::ZERO))..)?
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use crate::{DatabaseHashedCursorFactory, DatabaseTrieCursorFactory};
|
||||
use alloy_primitives::{map::B256HashMap, Bytes};
|
||||
use alloy_primitives::{map::B256Map, Bytes};
|
||||
use reth_db_api::transaction::DbTx;
|
||||
use reth_execution_errors::TrieWitnessError;
|
||||
use reth_trie::{
|
||||
@ -17,7 +17,7 @@ pub trait DatabaseTrieWitness<'a, TX> {
|
||||
tx: &'a TX,
|
||||
input: TrieInput,
|
||||
target: HashedPostState,
|
||||
) -> Result<B256HashMap<Bytes>, TrieWitnessError>;
|
||||
) -> Result<B256Map<Bytes>, TrieWitnessError>;
|
||||
}
|
||||
|
||||
impl<'a, TX: DbTx> DatabaseTrieWitness<'a, TX>
|
||||
@ -31,7 +31,7 @@ impl<'a, TX: DbTx> DatabaseTrieWitness<'a, TX>
|
||||
tx: &'a TX,
|
||||
input: TrieInput,
|
||||
target: HashedPostState,
|
||||
) -> Result<B256HashMap<Bytes>, TrieWitnessError> {
|
||||
) -> Result<B256Map<Bytes>, TrieWitnessError> {
|
||||
let nodes_sorted = input.nodes.into_sorted();
|
||||
let state_sorted = input.state.into_sorted();
|
||||
Self::from_tx(tx)
|
||||
|
||||
Reference in New Issue
Block a user