Fix code comments referring to sighash

Recently we added a bunch of additional sighash types, some of the code
comments became stale. Use the non-specific term 'sighash type' instead
of a particular sighash identifier in comments to make the comments more
applicable.
This commit is contained in:
Tobin Harding 2022-03-29 10:45:46 +11:00
parent 8f36c3979c
commit 46c34b3fb7
4 changed files with 4 additions and 4 deletions

View File

@ -871,7 +871,7 @@ impl EcdsaSighashType {
pub fn to_u32(self) -> u32 { self as u32 }
}
/// Error returned when parsing `SigHashType` fails.
/// Error returned for failure during parsing one of the sighash types.
///
/// This is currently returned for unrecognized sighash strings.
#[derive(Debug, Clone)]

View File

@ -61,7 +61,7 @@ pub enum Error {
/// Actual
actual: Box<Transaction>,
},
/// Unable to parse as a standard SigHash type.
/// Unable to parse as a standard sighash type.
NonStandardSighashType(u32),
/// Parsing errors from bitcoin_hashes
HashParseError(hashes::Error),

View File

@ -16,7 +16,7 @@
//!
//! Implementation of BIP174 Partially Signed Bitcoin Transaction Format as
//! defined at <https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki>
//! except we define PSBTs containing non-standard SigHash types as invalid.
//! except we define PSBTs containing non-standard sighash types as invalid.
//!
use core::cmp;

View File

@ -645,7 +645,7 @@ impl<R: Deref<Target=Transaction>> SighashCache<R> {
Ok(())
}
/// Computes the legacy sighash for any SigHashType
/// Computes the legacy sighash for any sighash type.
pub fn legacy_signature_hash(
&self,
input_index: usize,