diff --git a/src/blockdata/script.rs b/src/blockdata/script.rs index 052be93f..d3f2a55c 100644 --- a/src/blockdata/script.rs +++ b/src/blockdata/script.rs @@ -157,7 +157,7 @@ pub enum Error { /// Can not find the spent output UnknownSpentOutput(OutPoint), /// Can not serialize the spending transaction - SerializationError + Serialization } impl fmt::Display for Error { @@ -169,7 +169,7 @@ impl fmt::Display for Error { #[cfg(feature = "bitcoinconsensus")] Error::BitcoinConsensus(ref _n) => "bitcoinconsensus verification failed", Error::UnknownSpentOutput(ref _point) => "unknown spent output Transaction::verify()", - Error::SerializationError => "can not serialize the spending transaction in Transaction::verify()", + Error::Serialization => "can not serialize the spending transaction in Transaction::verify()", }; f.write_str(str) } @@ -186,7 +186,7 @@ impl std::error::Error for Error { | EarlyEndOfScript | NumericOverflow | UnknownSpentOutput(_) - | SerializationError => None, + | Serialization => None, #[cfg(feature = "bitcoinconsensus")] BitcoinConsensus(_) => None, } diff --git a/src/util/psbt/error.rs b/src/util/psbt/error.rs index 29719e71..7965e0e6 100644 --- a/src/util/psbt/error.rs +++ b/src/util/psbt/error.rs @@ -58,7 +58,7 @@ pub enum Error { /// Unable to parse as a standard sighash type. NonStandardSighashType(u32), /// Parsing errors from bitcoin_hashes - HashParseError(hashes::Error), + HashParse(hashes::Error), /// The pre-image must hash to the correponding psbt hash InvalidPreimageHashPair { /// Hash-type @@ -93,7 +93,7 @@ impl fmt::Display for Error { Error::NoMorePairs => f.write_str("no more key-value pairs for this psbt map"), Error::UnexpectedUnsignedTx { expected: ref e, actual: ref a } => write!(f, "different unsigned transaction: expected {}, actual {}", e.txid(), a.txid()), Error::NonStandardSighashType(ref sht) => write!(f, "non-standard sighash type: {}", sht), - Error::HashParseError(ref e) => write_err!(f, "hash parse error"; e), + Error::HashParse(ref e) => write_err!(f, "hash parse error"; e), Error::InvalidPreimageHashPair{ref preimage, ref hash, ref hash_type} => { // directly using debug forms of psbthash enums write!(f, "Preimage {:?} does not match {:?} hash {:?}", preimage, hash_type, hash ) @@ -111,7 +111,7 @@ impl std::error::Error for Error { use self::Error::*; match self { - HashParseError(e) => Some(e), + HashParse(e) => Some(e), | InvalidMagic | MissingUtxo | InvalidSeparator @@ -135,7 +135,7 @@ impl std::error::Error for Error { #[doc(hidden)] impl From for Error { fn from(e: hashes::Error) -> Error { - Error::HashParseError(e) + Error::HashParse(e) } }