mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor(interfaces): Result -> RethResult, Error -> RethError (#4695)
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
use crate::metrics::PayloadBuilderMetrics;
|
||||
use futures_core::ready;
|
||||
use futures_util::FutureExt;
|
||||
use reth_interfaces::Error;
|
||||
use reth_interfaces::{RethError, RethResult};
|
||||
use reth_payload_builder::{
|
||||
database::CachedReads, error::PayloadBuilderError, BuiltPayload, KeepPayloadJobAlive,
|
||||
PayloadBuilderAttributes, PayloadJob, PayloadJobGenerator,
|
||||
@ -964,12 +964,12 @@ impl WithdrawalsOutcome {
|
||||
/// Returns the withdrawals root.
|
||||
///
|
||||
/// Returns `None` values pre shanghai
|
||||
fn commit_withdrawals<DB: Database<Error = Error>>(
|
||||
fn commit_withdrawals<DB: Database<Error = RethError>>(
|
||||
db: &mut State<DB>,
|
||||
chain_spec: &ChainSpec,
|
||||
timestamp: u64,
|
||||
withdrawals: Vec<Withdrawal>,
|
||||
) -> Result<WithdrawalsOutcome, Error> {
|
||||
) -> RethResult<WithdrawalsOutcome> {
|
||||
if !chain_spec.is_shanghai_activated_at_timestamp(timestamp) {
|
||||
return Ok(WithdrawalsOutcome::pre_shanghai())
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//! Error types emitted by types or implementations of this crate.
|
||||
|
||||
use reth_interfaces::RethError;
|
||||
use reth_primitives::H256;
|
||||
use reth_transaction_pool::BlobStoreError;
|
||||
use revm_primitives::EVMError;
|
||||
@ -19,10 +20,10 @@ pub enum PayloadBuilderError {
|
||||
BlobStore(#[from] BlobStoreError),
|
||||
/// Other internal error
|
||||
#[error(transparent)]
|
||||
Internal(#[from] reth_interfaces::Error),
|
||||
Internal(#[from] RethError),
|
||||
/// Unrecoverable error during evm execution.
|
||||
#[error("evm execution error: {0:?}")]
|
||||
EvmExecutionError(EVMError<reth_interfaces::Error>),
|
||||
EvmExecutionError(EVMError<RethError>),
|
||||
/// Thrown if the payload requests withdrawals before Shanghai activation.
|
||||
#[error("withdrawals set before Shanghai activation")]
|
||||
WithdrawalsBeforeShanghai,
|
||||
|
||||
Reference in New Issue
Block a user