Skip to content

Commit 2979e1f

Browse files
add log
1 parent f269e3f commit 2979e1f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/blockchain-tree/src/blockchain_tree.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use reth_trie::{hashed_cursor::HashedPostStateCursorFactory, StateRoot};
3030
use std::{
3131
collections::{btree_map::Entry, BTreeMap, HashSet},
3232
sync::Arc,
33+
time::Instant,
3334
};
3435
use tracing::{debug, error, info, instrument, trace, warn};
3536

@@ -1238,6 +1239,7 @@ where
12381239
// State root calculation can take a while, and we're sure no write transaction
12391240
// will be open in parallel. See https://github.com/paradigmxyz/reth/issues/6168.
12401241
.disable_long_read_transaction_safety();
1242+
let start = Instant::now();
12411243
let (state_root, trie_updates) = StateRoot::from_tx(provider.tx_ref())
12421244
.with_hashed_cursor_factory(HashedPostStateCursorFactory::new(
12431245
provider.tx_ref(),
@@ -1246,6 +1248,8 @@ where
12461248
.with_prefix_sets(prefix_sets)
12471249
.root_with_updates()
12481250
.map_err(Into::<BlockValidationError>::into)?;
1251+
let elapsed = start.elapsed();
1252+
debug!(target: "blockchain_tree", elapsed = ?elapsed, "Test info: state root computed");
12491253
let tip = blocks.tip();
12501254
if state_root != tip.state_root {
12511255
return Err(ProviderError::StateRootMismatch(Box::new(RootMismatch {

0 commit comments

Comments
 (0)