psbt: Remove unused error variant

This error variant is never used, remove it.
This commit is contained in:
Tobin C. Harding 2023-02-01 14:33:16 +11:00
parent f52301151c
commit 4a03e2e721
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 0 additions and 10 deletions

View File

@ -647,8 +647,6 @@ pub enum SigningAlgorithm {
/// Errors encountered while calculating the sighash message. /// Errors encountered while calculating the sighash message.
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
pub enum SignError { pub enum SignError {
/// An ECDSA key-related error occurred.
EcdsaSig(ecdsa::Error),
/// Input index out of bounds (actual index, maximum index allowed). /// Input index out of bounds (actual index, maximum index allowed).
IndexOutOfBounds(usize, usize), IndexOutOfBounds(usize, usize),
/// Invalid Sighash type. /// Invalid Sighash type.
@ -696,7 +694,6 @@ impl fmt::Display for SignError {
NotEcdsa => write!(f, "attempted to ECDSA sign an non-ECDSA input"), NotEcdsa => write!(f, "attempted to ECDSA sign an non-ECDSA input"),
NotWpkh => write!(f, "the scriptPubkey is not a P2WPKH script"), NotWpkh => write!(f, "the scriptPubkey is not a P2WPKH script"),
SighashComputation(e) => write!(f, "sighash: {}", e), SighashComputation(e) => write!(f, "sighash: {}", e),
EcdsaSig(ref e) => write_err!(f, "ecdsa signature"; e),
UnknownOutputType => write!(f, "unable to determine the output type"), UnknownOutputType => write!(f, "unable to determine the output type"),
KeyNotFound => write!(f, "unable to find key"), KeyNotFound => write!(f, "unable to find key"),
WrongSigningAlgorithm => write!(f, "attempt to sign an input with the wrong signing algorithm"), WrongSigningAlgorithm => write!(f, "attempt to sign an input with the wrong signing algorithm"),
@ -725,7 +722,6 @@ impl std::error::Error for SignError {
| KeyNotFound | KeyNotFound
| WrongSigningAlgorithm | WrongSigningAlgorithm
| Unsupported => None, | Unsupported => None,
EcdsaSig(ref e) => Some(e),
SighashComputation(ref e) => Some(e), SighashComputation(ref e) => Some(e),
} }
} }
@ -737,12 +733,6 @@ impl From<sighash::Error> for SignError {
} }
} }
impl From<ecdsa::Error> for SignError {
fn from(e: ecdsa::Error) -> Self {
SignError::EcdsaSig(e)
}
}
#[cfg(feature = "base64")] #[cfg(feature = "base64")]
mod display_from_str { mod display_from_str {
use super::{PartiallySignedTransaction, Error}; use super::{PartiallySignedTransaction, Error};