diff --git a/crates/block-producer/src/errors.rs b/crates/block-producer/src/errors.rs index a546e5a9..18d4f7dc 100644 --- a/crates/block-producer/src/errors.rs +++ b/crates/block-producer/src/errors.rs @@ -120,21 +120,12 @@ pub enum BuildBatchError { )] TooManyAccountsInBatch(Vec), - #[error("Failed to create notes SMT: {0}")] - NotesSmtError(MerkleError, Vec), - - #[error("Failed to get note paths: {0}")] - NotePathsError(NotePathsError, Vec), - #[error("Duplicated unauthenticated transaction input note ID in the batch: {0}")] DuplicateUnauthenticatedNote(NoteId, Vec), #[error("Duplicated transaction output note ID in the batch: {0}")] DuplicateOutputNote(NoteId, Vec), - #[error("Unauthenticated transaction notes not found in the store: {0:?}")] - UnauthenticatedNotesNotFound(Vec, Vec), - #[error("Note hashes mismatch for note {id}: (input: {input_hash}, output: {output_hash})")] NoteHashesMismatch { id: NoteId, @@ -154,24 +145,6 @@ pub enum BuildBatchError { InjectedFailure(Vec), } -impl BuildBatchError { - pub fn into_transactions(self) -> Vec { - match self { - BuildBatchError::TooManyInputNotes(_, txs) => txs, - BuildBatchError::TooManyNotesCreated(_, txs) => txs, - BuildBatchError::TooManyAccountsInBatch(txs) => txs, - BuildBatchError::NotesSmtError(_, txs) => txs, - BuildBatchError::NotePathsError(_, txs) => txs, - BuildBatchError::DuplicateUnauthenticatedNote(_, txs) => txs, - BuildBatchError::DuplicateOutputNote(_, txs) => txs, - BuildBatchError::UnauthenticatedNotesNotFound(_, txs) => txs, - BuildBatchError::NoteHashesMismatch { txs, .. } => txs, - BuildBatchError::AccountUpdateError { txs, .. } => txs, - BuildBatchError::InjectedFailure(txs) => txs, - } - } -} - // Block prover errors // ================================================================================================= @@ -199,18 +172,6 @@ pub enum BlockInputsError { GrpcClientError(String), } -// Note paths errors -// ================================================================================================= - -#[allow(clippy::enum_variant_names)] -#[derive(Debug, PartialEq, Eq, Error)] -pub enum NotePathsError { - #[error("failed to parse protobuf message: {0}")] - ConversionError(#[from] ConversionError), - #[error("gRPC client failed with error: {0}")] - GrpcClientError(String), -} - // Block applying errors // =================================================================================================