More non-API breaking error derives depending on upstream PRs
This commit is contained in:
parent
5b962dc9a9
commit
c0b7defc86
|
@ -105,7 +105,7 @@ display_from_debug!(Builder);
|
|||
/// Ways that a script might fail. Not everything is split up as
|
||||
/// much as it could be; patches welcome if more detailed errors
|
||||
/// would help you.
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
|
||||
pub enum Error {
|
||||
/// Something did a non-minimal push; for more information see
|
||||
/// `https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Push_operators`
|
||||
|
|
|
@ -49,7 +49,7 @@ use util::base58;
|
|||
use util::ecdsa;
|
||||
|
||||
/// Address error.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
|
||||
pub enum Error {
|
||||
/// Base58 encoding error
|
||||
Base58(base58::Error),
|
||||
|
|
|
@ -423,16 +423,16 @@ impl fmt::Debug for DerivationPath {
|
|||
pub type KeySource = (Fingerprint, DerivationPath);
|
||||
|
||||
/// A BIP32 error
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
pub enum Error {
|
||||
/// A pk->pk derivation was attempted on a hardened key
|
||||
CannotDeriveFromHardenedKey,
|
||||
/// A secp256k1 error occurred
|
||||
Ecdsa(secp256k1::Error),
|
||||
Ecdsa(secp256k1::Error), // TODO: This is not necessary ECDSA error and should be renamed
|
||||
/// A child number was provided that was out of range
|
||||
InvalidChildNumber(u32),
|
||||
/// Error creating a master seed --- for application use
|
||||
RngError(String),
|
||||
RngError(String), // TODO: This option seems unused and should be removed, opening a way to make this type copiable
|
||||
/// Invalid childnumber format.
|
||||
InvalidChildNumberFormat,
|
||||
/// Invalid derivation path format.
|
||||
|
|
|
@ -36,7 +36,7 @@ use util::address;
|
|||
static PUBKEY: u8 = 0xFE;
|
||||
|
||||
/// A contract-hash error
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
|
||||
pub enum Error {
|
||||
/// Other secp256k1 related error
|
||||
Secp(secp256k1::Error),
|
||||
|
|
|
@ -26,7 +26,7 @@ use secp256k1;
|
|||
use util::base58;
|
||||
|
||||
/// A key-related error.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
pub enum Error {
|
||||
/// Base58 encoding error
|
||||
Base58(base58::Error),
|
||||
|
|
|
@ -21,7 +21,7 @@ use util::psbt::raw;
|
|||
|
||||
use hashes;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
/// Enum for marking psbt hash error
|
||||
pub enum PsbtHash {
|
||||
Ripemd,
|
||||
|
@ -30,7 +30,7 @@ pub enum PsbtHash {
|
|||
Hash256,
|
||||
}
|
||||
/// Ways that a Partially Signed Transaction might fail.
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
pub enum Error {
|
||||
/// Magic bytes for a PSBT must be the ASCII for "psbt" serialized in most
|
||||
/// significant byte order.
|
||||
|
|
Loading…
Reference in New Issue