Skip to content

Commit

Permalink
SigHashType -> SighashType
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed Jul 17, 2023
1 parent 229be29 commit 468b787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pset/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub enum Error {
actual: Txid,
},
/// Unable to parse as a standard SigHash type.
NonStandardSigHashType(u32),
NonStandardSighashType(u32),
/// Parsing errors from bitcoin_hashes
HashParseError(hashes::Error),
/// The pre-image must hash to the correponding pset hash
Expand Down Expand Up @@ -129,7 +129,7 @@ impl fmt::Display for Error {
expected: ref e,
actual: ref a,
} => write!(f, "different id: expected {}, actual {}", e, a),
Error::NonStandardSigHashType(ref sht) => {
Error::NonStandardSighashType(ref sht) => {
write!(f, "non-standard sighash type: {}", sht)
}
Error::InvalidMagic => f.write_str("invalid magic"),
Expand Down
8 changes: 4 additions & 4 deletions src/sighash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub enum Error {
WrongAnnex,

/// Invalid Sighash type
InvalidSigHashType(u8),
InvalidSighashType(u8),
}

impl fmt::Display for Error {
Expand All @@ -160,7 +160,7 @@ impl fmt::Display for Error {
Error::PrevoutIndex => write!(f, "The index requested is greater than available prevouts or different from the provided [Provided::Anyone] index"),
Error::PrevoutKind => write!(f, "A single prevout has been provided but all prevouts are needed without `ANYONECANPAY`"),
Error::WrongAnnex => write!(f, "Annex must be at least one byte long and the first bytes must be `0x50`"),
Error::InvalidSigHashType(hash_ty) => write!(f, "Invalid schnorr Signature hash type : {} ", hash_ty),
Error::InvalidSighashType(hash_ty) => write!(f, "Invalid schnorr Signature hash type : {} ", hash_ty),
}
}
}
Expand Down Expand Up @@ -588,7 +588,7 @@ impl<R: Deref<Target = Transaction>> SighashCache<R> {

/// Encodes the signing data from which a signature hash for a given input index with a given
/// sighash flag can be computed. To actually produce a scriptSig, this hash needs to be run
/// through an ECDSA signer, the SigHashType appended to the resulting sig, and a script
/// through an ECDSA signer, the SighashType appended to the resulting sig, and a script
/// written around this, but this is the general (and hard) part.
///
/// *Warning* This does NOT attempt to support OP_CODESEPARATOR. In general this would require
Expand Down Expand Up @@ -675,7 +675,7 @@ impl<R: Deref<Target = Transaction>> SighashCache<R> {

/// Computes a signature hash for a given input index with a given sighash flag.
/// To actually produce a scriptSig, this hash needs to be run through an
/// ECDSA signer, the SigHashType appended to the resulting sig, and a
/// ECDSA signer, the SighashType appended to the resulting sig, and a
/// script written around this, but this is the general (and hard) part.
/// Does not take a mutable reference because it does not do any caching.
///
Expand Down

0 comments on commit 468b787

Please sign in to comment.