perf: use alloy hash map in trie related code (#12956)

This commit is contained in:
Roman Krasiuk
2024-11-28 13:12:47 +01:00
committed by GitHub
parent e9a6e4525e
commit c274462059
12 changed files with 74 additions and 68 deletions

View File

@ -1,10 +1,10 @@
use alloy_primitives::{Address, BlockNumber, B256};
use alloy_primitives::{map::HashMap, Address, BlockNumber, B256};
use auto_impl::auto_impl;
use reth_db::models::{AccountBeforeTx, BlockNumberAddress};
use reth_primitives::{Account, StorageEntry};
use reth_storage_errors::provider::ProviderResult;
use std::{
collections::{BTreeMap, BTreeSet, HashMap},
collections::{BTreeMap, BTreeSet},
ops::{RangeBounds, RangeInclusive},
};

View File

@ -114,7 +114,7 @@ pub trait StorageTrieWriter: Send + Sync {
/// Returns the number of entries modified.
fn write_storage_trie_updates(
&self,
storage_tries: &std::collections::HashMap<B256, StorageTrieUpdates>,
storage_tries: &HashMap<B256, StorageTrieUpdates>,
) -> ProviderResult<usize>;
/// Writes storage trie updates for the given hashed address.