mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-01 02:25:24 -05:00
Co-authored-by: Alessandro Mazza <121622391+alessandromazza98@users.noreply.github.com> Co-authored-by: Supernovahs.eth <91280922+supernovahs@users.noreply.github.com> Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
37 lines
1.2 KiB
Rust
37 lines
1.2 KiB
Rust
//! Error types emitted by types or implementations of this crate.
|
|
|
|
use reth_interfaces::RethError;
|
|
use reth_primitives::B256;
|
|
use reth_transaction_pool::BlobStoreError;
|
|
use revm_primitives::EVMError;
|
|
use tokio::sync::oneshot;
|
|
|
|
/// Possible error variants during payload building.
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum PayloadBuilderError {
|
|
/// Thrown whe the parent block is missing.
|
|
#[error("missing parent block {0:?}")]
|
|
MissingParentBlock(B256),
|
|
/// An oneshot channels has been closed.
|
|
#[error("sender has been dropped")]
|
|
ChannelClosed,
|
|
/// Error occurring in the blob store.
|
|
#[error(transparent)]
|
|
BlobStore(#[from] BlobStoreError),
|
|
/// Other internal error
|
|
#[error(transparent)]
|
|
Internal(#[from] RethError),
|
|
/// Unrecoverable error during evm execution.
|
|
#[error("evm execution error: {0:?}")]
|
|
EvmExecutionError(EVMError<RethError>),
|
|
/// Thrown if the payload requests withdrawals before Shanghai activation.
|
|
#[error("withdrawals set before Shanghai activation")]
|
|
WithdrawalsBeforeShanghai,
|
|
}
|
|
|
|
impl From<oneshot::error::RecvError> for PayloadBuilderError {
|
|
fn from(_: oneshot::error::RecvError) -> Self {
|
|
PayloadBuilderError::ChannelClosed
|
|
}
|
|
}
|