diff --git a/zebra-consensus/src/error.rs b/zebra-consensus/src/error.rs index 7ec970c1..0e324ec7 100644 --- a/zebra-consensus/src/error.rs +++ b/zebra-consensus/src/error.rs @@ -9,7 +9,7 @@ use thiserror::Error; use crate::BoxError; -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Copy, Clone, Debug, PartialEq)] pub enum SubsidyError { #[error("no coinbase transaction in block")] NoCoinbase, @@ -18,7 +18,7 @@ pub enum SubsidyError { FoundersRewardNotFound, } -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Clone, Debug, PartialEq)] pub enum TransactionError { #[error("first transaction must be coinbase")] CoinbasePosition, @@ -108,7 +108,7 @@ impl From for BlockError { } } -#[derive(Error, Debug, PartialEq)] +#[derive(Error, Clone, Debug, PartialEq)] pub enum BlockError { #[error("block contains invalid transactions")] Transaction(#[from] TransactionError), diff --git a/zebra-script/src/lib.rs b/zebra-script/src/lib.rs index e81dbd3f..9fcfd56e 100644 --- a/zebra-script/src/lib.rs +++ b/zebra-script/src/lib.rs @@ -24,7 +24,7 @@ use zebra_chain::{ transparent, }; -#[derive(Debug, Display, Error, PartialEq)] +#[derive(Copy, Clone, Debug, Display, Error, PartialEq)] #[non_exhaustive] /// An Error type representing the error codes returned from zcash_script. pub enum Error {