Skip to content

Commit bda6df7

Browse files
committed
Merge rust-bitcoin#5042: fix: correct typos in PSBT serialization code
9d1c914 fix: correct typos in PSBT serialization code (Cameric) Pull request description: Fix spelling error in constant name PSBT_SERPARATOR -> PSBT_SEPARATOR and remove extra word "use" in signature verification comment ACKs for top commit: tcharding: ACK 9d1c914 apoelstra: ACK 9d1c914; successfully ran local tests Tree-SHA512: 9534ba76584bdf7d4874664605c08fed4cc3efd6973674f874581aa3a5f44f15509887bec39f5d4973a2f9b571e6c20d42a12b6dc09e7beb9d8ec13952101a6f
2 parents a5bdcdb + 9d1c914 commit bda6df7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bitcoin/src/psbt/serialize.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ impl Psbt {
8989
return Err(Error::InvalidMagic);
9090
}
9191

92-
const PSBT_SERPARATOR: u8 = 0xff_u8;
92+
const PSBT_SEPARATOR: u8 = 0xff_u8;
9393
let separator: u8 = Decodable::consensus_decode(r)?;
94-
if separator != PSBT_SERPARATOR {
94+
if separator != PSBT_SEPARATOR {
9595
return Err(Error::InvalidSeparator);
9696
}
9797

@@ -224,7 +224,7 @@ impl Deserialize for ecdsa::Signature {
224224
// 2) This would cause to have invalid signatures because the sighash message
225225
// also has a field sighash_u32 (See BIP-0141). For example, when signing with non-standard
226226
// 0x05, the sighash message would have the last field as 0x05u32 while, the verification
227-
// would use check the signature assuming sighash_u32 as `0x01`.
227+
// would check the signature assuming sighash_u32 as `0x01`.
228228
ecdsa::Signature::from_slice(bytes).map_err(|e| match e {
229229
ecdsa::DecodeError::EmptySignature => Error::InvalidEcdsaSignature(e),
230230
ecdsa::DecodeError::SighashType(err) => Error::NonStandardSighashType(err.0),

0 commit comments

Comments
 (0)