feat(tree): disable long read transaction safety on newPayload (#7511)

This commit is contained in:
Alexey Shekhirin
2024-04-08 17:17:29 +01:00
committed by GitHub
parent d6dd1c2dab
commit 03fa7ee85d

View File

@ -194,8 +194,12 @@ impl AppendableChain {
// The usage has to be re-evaluated if that was ever to change.
let consistent_view =
ConsistentDbView::new_with_latest_tip(externals.provider_factory.clone())?;
let state_provider =
consistent_view.provider_ro()?.state_provider_by_block_number(canonical_fork.number)?;
let state_provider = consistent_view
.provider_ro()?
// 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/7509.
.disable_long_read_transaction_safety()
.state_provider_by_block_number(canonical_fork.number)?;
let provider = BundleStateProvider::new(state_provider, bundle_state_data_provider);