mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(storage, blockchain-tree): disable backtrace on long read tx when it's safe (#6177)
This commit is contained in:
@ -1174,7 +1174,13 @@ impl<DB: Database, EF: ExecutorFactory> BlockchainTree<DB, EF> {
|
||||
}
|
||||
None => {
|
||||
debug!(target: "blockchain_tree", blocks = ?block_hash_numbers, "Recomputing state root for insert");
|
||||
let provider = self.externals.provider_factory.provider()?;
|
||||
let provider = self
|
||||
.externals
|
||||
.provider_factory
|
||||
.provider()?
|
||||
// State root calculation can take a while, and we're sure no write transaction
|
||||
// will be open in parallel. See https://github.com/paradigmxyz/reth/issues/6168.
|
||||
.disable_backtrace_on_long_read_transaction();
|
||||
let (state_root, trie_updates) = hashed_state
|
||||
.state_root_with_updates(provider.tx_ref())
|
||||
.map_err(Into::<DatabaseError>::into)?;
|
||||
|
||||
Reference in New Issue
Block a user