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;
|
use crate::BoxError;
|
||||||
|
|
||||||
#[derive(Error, Debug, PartialEq)]
|
#[derive(Error, Copy, Clone, Debug, PartialEq)]
|
||||||
pub enum SubsidyError {
|
pub enum SubsidyError {
|
||||||
#[error("no coinbase transaction in block")]
|
#[error("no coinbase transaction in block")]
|
||||||
NoCoinbase,
|
NoCoinbase,
|
||||||
|
|
@ -18,7 +18,7 @@ pub enum SubsidyError {
|
||||||
FoundersRewardNotFound,
|
FoundersRewardNotFound,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Error, Debug, PartialEq)]
|
#[derive(Error, Clone, Debug, PartialEq)]
|
||||||
pub enum TransactionError {
|
pub enum TransactionError {
|
||||||
#[error("first transaction must be coinbase")]
|
#[error("first transaction must be coinbase")]
|
||||||
CoinbasePosition,
|
CoinbasePosition,
|
||||||
|
|
@ -108,7 +108,7 @@ impl From<SubsidyError> for BlockError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Error, Debug, PartialEq)]
|
#[derive(Error, Clone, Debug, PartialEq)]
|
||||||
pub enum BlockError {
|
pub enum BlockError {
|
||||||
#[error("block contains invalid transactions")]
|
#[error("block contains invalid transactions")]
|
||||||
Transaction(#[from] TransactionError),
|
Transaction(#[from] TransactionError),
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ use zebra_chain::{
|
||||||
transparent,
|
transparent,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Display, Error, PartialEq)]
|
#[derive(Copy, Clone, Debug, Display, Error, PartialEq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
/// An Error type representing the error codes returned from zcash_script.
|
/// An Error type representing the error codes returned from zcash_script.
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue