mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 15:28:01 -05:00
chore: remove StateRoot variant from BlockValidationError (#14858)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -19,8 +19,6 @@ alloy-primitives.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
nybbles.workspace = true
|
||||
|
||||
revm-database-interface.workspace = true
|
||||
|
||||
thiserror.workspace = true
|
||||
|
||||
[features]
|
||||
@@ -30,7 +28,6 @@ std = [
|
||||
"alloy-rlp/std",
|
||||
"thiserror/std",
|
||||
"nybbles/std",
|
||||
"revm-database-interface/std",
|
||||
"reth-storage-errors/std",
|
||||
"alloy-evm/std",
|
||||
]
|
||||
|
||||
@@ -37,9 +37,6 @@ pub enum BlockValidationError {
|
||||
/// Error when incrementing balance in post execution
|
||||
#[error("incrementing balance in post execution failed")]
|
||||
IncrementBalanceFailed,
|
||||
/// Error when the state root does not match the expected value.
|
||||
#[error(transparent)]
|
||||
StateRoot(#[from] StateRootError),
|
||||
/// Error when transaction gas limit exceeds available block gas
|
||||
#[error(
|
||||
"transaction gas limit {transaction_gas_limit} is more than blocks available gas {block_available_gas}"
|
||||
@@ -137,11 +134,6 @@ impl BlockExecutionError {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the error is a state root error.
|
||||
pub const fn is_state_root_error(&self) -> bool {
|
||||
matches!(self, Self::Validation(BlockValidationError::StateRoot(_)))
|
||||
}
|
||||
|
||||
/// Handles an EVM error occurred when executing a transaction.
|
||||
///
|
||||
/// If an error matches [`EvmError::InvalidTransaction`], it will be wrapped into
|
||||
@@ -164,8 +156,6 @@ impl From<ProviderError> for BlockExecutionError {
|
||||
}
|
||||
}
|
||||
|
||||
impl revm_database_interface::DBErrorMarker for BlockExecutionError {}
|
||||
|
||||
/// Internal (i.e., not validation or consensus related) `BlockExecutor` Errors
|
||||
#[derive(Error, Debug)]
|
||||
pub enum InternalBlockExecutionError {
|
||||
|
||||
Reference in New Issue
Block a user