Skip to content

Commit 4b21ebe

Browse files
committed
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.
1 parent 4e24b30 commit 4b21ebe

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/blockdata/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ impl EcdsaSighashType {
871871
pub fn to_u32(self) -> u32 { self as u32 }
872872
}
873873

874-
/// Error returned when parsing `SigHashType` fails.
874+
/// Error returned for failure during parsing one of the sighash types.
875875
///
876876
/// This is currently returned for unrecognized sighash strings.
877877
#[derive(Debug, Clone)]

src/util/psbt/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub enum Error {
6161
/// Actual
6262
actual: Box<Transaction>,
6363
},
64-
/// Unable to parse as a standard SigHash type.
64+
/// Unable to parse as a standard sighash type.
6565
NonStandardSighashType(u32),
6666
/// Parsing errors from bitcoin_hashes
6767
HashParseError(hashes::Error),

src/util/psbt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//!
1717
//! Implementation of BIP174 Partially Signed Bitcoin Transaction Format as
1818
//! defined at <https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki>
19-
//! except we define PSBTs containing non-standard SigHash types as invalid.
19+
//! except we define PSBTs containing non-standard sighash types as invalid.
2020
//!
2121
2222
use core::cmp;

src/util/sighash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ impl<R: Deref<Target=Transaction>> SighashCache<R> {
645645
Ok(())
646646
}
647647

648-
/// Computes the legacy sighash for any SigHashType
648+
/// Computes the legacy sighash for any sighash type.
649649
pub fn legacy_signature_hash(
650650
&self,
651651
input_index: usize,

0 commit comments

Comments
 (0)