What changed, and why it matters
This commit fixes three English grammar typos in comments and user-facing error messages within the Partially Signed Bitcoin Transaction (PSBT) module. It changes 'an non-ECDSA' to 'a non-ECDSA' and 'an ripemd160' to 'a ripemd160'. There are no code logic changes.
No security action needed. This is a cosmetic typo fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies only documentation strings and Display formatting strings in bitcoin/src/psbt/mod.rs. Two instances correct the article before ‘non-ECDSA’ and one before ‘ripemd160’. No executable logic, type signatures, control flow, cryptographic operations, or API behavior is altered.
Changed components
bitcoin/src/psbt/mod.rsInspect captured patch +3 / −3
diff --git a/bitcoin/src/psbt/mod.rs b/bitcoin/src/psbt/mod.rs
index 838528bf..dae3a789 100644
--- a/bitcoin/src/psbt/mod.rs
+++ b/bitcoin/src/psbt/mod.rs
@@ -1057,7 +1057,7 @@ pub enum SignError {
MissingWitnessScript,
/// Signing algorithm and key type does not match.
MismatchedAlgoKey,
- /// Attempted to ECDSA sign an non-ECDSA input.
+ /// Attempted to ECDSA sign a non-ECDSA input.
NotEcdsa,
/// The `scriptPubkey` is not a P2WPKH script.
NotWpkh,
@@ -1093,7 +1093,7 @@ impl fmt::Display for SignError {
MissingSpendUtxo => write!(f, "missing spend utxo in PSBT"),
MissingWitnessScript => write!(f, "missing witness script"),
MismatchedAlgoKey => write!(f, "signing algorithm and key type does not match"),
- NotEcdsa => write!(f, "attempted to ECDSA sign an non-ECDSA input"),
+ NotEcdsa => write!(f, "attempted to ECDSA sign a non-ECDSA input"),
NotWpkh => write!(f, "the scriptPubkey is not a P2WPKH script"),
SegwitV0Sighash(ref e) => write_err!(f, "SegWit v0 sighash"; e),
P2wpkhSighash(ref e) => write_err!(f, "p2wpkh sighash"; e),
@@ -2247,7 +2247,7 @@ mod tests {
let rtt = hex_psbt(&unserialized.serialize_hex()).unwrap();
assert_eq!(rtt, unserialized);
- // Now add an ripemd160 with incorrect preimage
+ // Now add a ripemd160 with incorrect preimage
let mut ripemd160_preimages = BTreeMap::new();
ripemd160_preimages.insert(ripemd160::Hash::hash(&[17u8]), vec![18u8]);
unserialized.inputs[0].ripemd160_preimages = ripemd160_preimages;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.