chore(trie): replace ParallelStateRoot with AsyncStateRoot (#11213)

This commit is contained in:
Federico Gimenez
2024-09-26 10:25:19 +02:00
committed by GitHub
parent 353fd60d29
commit 42d2e485de
8 changed files with 67 additions and 399 deletions

View File

@ -13,7 +13,7 @@ use reth_trie::{
TrieInput,
};
use reth_trie_db::{DatabaseHashedCursorFactory, DatabaseStateRoot};
use reth_trie_parallel::{async_root::AsyncStateRoot, parallel_root::ParallelStateRoot};
use reth_trie_parallel::parallel_root::ParallelStateRoot;
use std::collections::HashMap;
pub fn calculate_state_root(c: &mut Criterion) {
@ -70,14 +70,6 @@ pub fn calculate_state_root(c: &mut Criterion) {
|calculator| async { calculator.incremental_root() },
);
});
// async root
group.bench_function(BenchmarkId::new("async root", size), |b| {
b.iter_with_setup(
|| AsyncStateRoot::new(view.clone(), TrieInput::from_state(updated_state.clone())),
|calculator| calculator.incremental_root(),
);
});
}
}