Derive Copy and Clone for zebra-consensus errors (#2664)
Co-authored-by: Marek <mail@marek.onl>
This commit is contained in:
parent
047576273c
commit
81f2ceef80
|
|
@ -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<SubsidyError> for BlockError {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Error, Debug, PartialEq)]
|
||||
#[derive(Error, Clone, Debug, PartialEq)]
|
||||
pub enum BlockError {
|
||||
#[error("block contains invalid transactions")]
|
||||
Transaction(#[from] TransactionError),
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue