From a6050352583c8cef90fbaf8b7222fcaa2a3c8c04 Mon Sep 17 00:00:00 2001 From: Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:40:07 +0800 Subject: [PATCH] Remove unused Senderrecovery variant (#14629) --- crates/engine/tree/src/tree/error.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/engine/tree/src/tree/error.rs b/crates/engine/tree/src/tree/error.rs index 668956890..f5edc3b86 100644 --- a/crates/engine/tree/src/tree/error.rs +++ b/crates/engine/tree/src/tree/error.rs @@ -73,11 +73,6 @@ impl InsertBlockError { Self::new(block, InsertBlockErrorKind::Consensus(error)) } - /// Create a new `InsertInvalidBlockError` from a consensus error - pub fn sender_recovery_error(block: SealedBlock) -> Self { - Self::new(block, InsertBlockErrorKind::SenderRecovery) - } - /// Consumes the error and returns the block that resulted in the error #[inline] pub fn into_block(self) -> SealedBlock { @@ -113,9 +108,6 @@ impl std::fmt::Debug for InsertBlockError { /// All error variants possible when inserting a block #[derive(Debug, thiserror::Error)] pub enum InsertBlockErrorKind { - /// Failed to recover senders for the block - #[error("failed to recover senders for block")] - SenderRecovery, /// Block violated consensus rules. #[error(transparent)] Consensus(#[from] ConsensusError), @@ -142,7 +134,6 @@ impl InsertBlockErrorKind { self, ) -> Result { match self { - Self::SenderRecovery => Ok(InsertBlockValidationError::SenderRecovery), Self::Consensus(err) => Ok(InsertBlockValidationError::Consensus(err)), // other execution errors that are considered internal errors Self::Execution(err) => { @@ -176,9 +167,6 @@ pub enum InsertBlockFatalError { /// Error variants that are caused by invalid blocks #[derive(Debug, thiserror::Error)] pub enum InsertBlockValidationError { - /// Failed to recover senders for the block - #[error("failed to recover senders for block")] - SenderRecovery, /// Block violated consensus rules. #[error(transparent)] Consensus(#[from] ConsensusError),