diff --git a/zebra-consensus/src/error.rs b/zebra-consensus/src/error.rs index 19e8b113e..a89e8b71e 100644 --- a/zebra-consensus/src/error.rs +++ b/zebra-consensus/src/error.rs @@ -43,13 +43,13 @@ pub enum TransactionError { #[error("if there are no Spends or Outputs, the value balance MUST be 0.")] BadBalance, - /// Could not verify a transparent script + #[error("could not verify a transparent script")] Script(#[from] zebra_script::Error), // XXX change this when we align groth16 verifier errors with bellman // and add a from annotation when the error type is more precise #[error("spend proof MUST be valid given a primary input formed from the other fields except spendAuthSig")] - Groth16(BoxError), + Groth16, #[error( "joinSplitSig MUST represent a valid signature under joinSplitPubKey of dataToBeSigned" @@ -64,7 +64,7 @@ impl From for TransactionError { fn from(err: BoxError) -> Self { match err.downcast::() { Ok(e) => TransactionError::RedJubjub(*e), - Err(e) => TransactionError::Internal(e), + Err(e) => panic!(e), } } } diff --git a/zebra-consensus/src/transaction.rs b/zebra-consensus/src/transaction.rs index 3d9d00edb..91fa6ed5b 100644 --- a/zebra-consensus/src/transaction.rs +++ b/zebra-consensus/src/transaction.rs @@ -5,7 +5,6 @@ use std::{ task::{Context, Poll}, }; -use displaydoc::Display; use futures::{ stream::{FuturesUnordered, StreamExt}, FutureExt, diff --git a/zebra-script/src/lib.rs b/zebra-script/src/lib.rs index 69ffad205..a5d4946cf 100644 --- a/zebra-script/src/lib.rs +++ b/zebra-script/src/lib.rs @@ -19,7 +19,7 @@ use zebra_chain::{ transparent, }; -#[derive(Debug, Display, Error)] +#[derive(Debug, Display, Error, PartialEq)] #[non_exhaustive] /// An Error type representing the error codes returned from zcash_script. pub enum Error {