reth_optimism_consensus/
error.rs
1use alloy_primitives::B256;
4use reth_consensus::ConsensusError;
5use reth_storage_errors::provider::ProviderError;
6
7#[derive(Debug, Clone, thiserror::Error)]
9pub enum OpConsensusError {
10 #[error("non-empty block body withdrawals list")]
12 WithdrawalsNonEmpty,
13 #[error("compute L2 withdrawals root failed: {_0}")]
15 L2WithdrawalsRootCalculationFail(#[from] ProviderError),
16 #[error("L2 withdrawals root missing from block header")]
18 L2WithdrawalsRootMissing,
19 #[error("L2 withdrawals root mismatch, header: {header}, exec_res: {exec_res}")]
21 L2WithdrawalsRootMismatch {
22 header: B256,
24 exec_res: B256,
26 },
27 #[error(transparent)]
29 Eth(#[from] ConsensusError),
30}