chore: use shorter map names (#14445)

This commit is contained in:
DaniPopes
2025-02-12 12:59:42 +01:00
committed by GitHub
parent 9090125f0d
commit fc7a3e5bc6
30 changed files with 90 additions and 108 deletions

View File

@ -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))..)?

View File

@ -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)