mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(root): send error on failure to retrieve provider (#13426)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -7406,7 +7406,6 @@ dependencies = [
|
||||
"reth-errors",
|
||||
"reth-ethereum-engine-primitives",
|
||||
"reth-evm",
|
||||
"reth-execution-errors",
|
||||
"reth-exex-types",
|
||||
"reth-metrics",
|
||||
"reth-network-p2p",
|
||||
|
||||
@ -21,7 +21,6 @@ reth-consensus.workspace = true
|
||||
reth-engine-primitives.workspace = true
|
||||
reth-errors.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-execution-errors.workspace = true
|
||||
reth-network-p2p.workspace = true
|
||||
reth-payload-builder-primitives.workspace = true
|
||||
reth-payload-builder.workspace = true
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
use alloy_primitives::map::HashSet;
|
||||
use rayon::iter::{ParallelBridge, ParallelIterator};
|
||||
use reth_errors::ProviderError;
|
||||
use reth_evm::system_calls::OnStateHook;
|
||||
use reth_execution_errors::StateProofError;
|
||||
use reth_provider::{
|
||||
providers::ConsistentDbView, BlockReader, DBProvider, DatabaseProviderFactory,
|
||||
StateCommitmentProvider,
|
||||
@ -89,7 +89,7 @@ pub enum StateRootMessage<BPF: BlindedProviderFactory> {
|
||||
/// Proof calculation completed for a specific state update
|
||||
ProofCalculated(Box<ProofCalculated>),
|
||||
/// Error during proof calculation
|
||||
ProofCalculationError(StateProofError),
|
||||
ProofCalculationError(ProviderError),
|
||||
/// State root calculation completed
|
||||
RootCalculated {
|
||||
/// The updated sparse trie
|
||||
@ -346,6 +346,8 @@ where
|
||||
Ok(provider) => provider,
|
||||
Err(error) => {
|
||||
error!(target: "engine::root", ?error, "Could not get provider");
|
||||
let _ = state_root_message_sender
|
||||
.send(StateRootMessage::ProofCalculationError(error));
|
||||
return;
|
||||
}
|
||||
};
|
||||
@ -368,9 +370,9 @@ where
|
||||
}),
|
||||
));
|
||||
}
|
||||
Err(e) => {
|
||||
let _ =
|
||||
state_root_message_sender.send(StateRootMessage::ProofCalculationError(e));
|
||||
Err(error) => {
|
||||
let _ = state_root_message_sender
|
||||
.send(StateRootMessage::ProofCalculationError(error.into()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user