fix: correct typos in PSBT serialization code
What changed, and why it matters
This commit fixes two typos in comments/constant names within PSBT serialization code. One renames a local constant from PSBT_SERPARATOR to PSBT_SEPARATOR (the value 0xff is unchanged), and the other fixes a grammar error in a comment. Neither change alters program behavior.
No security action needed; this is a non-functional typo cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is purely cosmetic: a misspelled local constant identifier is corrected and a duplicated word in a comment is removed. The separator byte value remains 0xff, and all logic, error handling, and consensus decoding behavior are identical before and after the patch.
Changed components
bitcoin/src/psbt/serialize.rsInspect captured patch +3 / −3
diff --git a/bitcoin/src/psbt/serialize.rs b/bitcoin/src/psbt/serialize.rs
index c529df97..3fd1b0e6 100644
--- a/bitcoin/src/psbt/serialize.rs
+++ b/bitcoin/src/psbt/serialize.rs
@@ -89,9 +89,9 @@ impl Psbt {
return Err(Error::InvalidMagic);
}
- const PSBT_SERPARATOR: u8 = 0xff_u8;
+ const PSBT_SEPARATOR: u8 = 0xff_u8;
let separator: u8 = Decodable::consensus_decode(r)?;
- if separator != PSBT_SERPARATOR {
+ if separator != PSBT_SEPARATOR {
return Err(Error::InvalidSeparator);
}
@@ -224,7 +224,7 @@ impl Deserialize for ecdsa::Signature {
// 2) This would cause to have invalid signatures because the sighash message
// also has a field sighash_u32 (See BIP-0141). For example, when signing with non-standard
// 0x05, the sighash message would have the last field as 0x05u32 while, the verification
- // would use check the signature assuming sighash_u32 as `0x01`.
+ // would check the signature assuming sighash_u32 as `0x01`.
ecdsa::Signature::from_slice(bytes).map_err(|e| match e {
ecdsa::DecodeError::EmptySignature => Error::InvalidEcdsaSignature(e),
ecdsa::DecodeError::SighashType(err) => Error::NonStandardSighashType(err.0),
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.