Skip to content

Commit 9d1c914

Browse files
authored
fix: correct typos in PSBT serialization code
1 parent 9b90283 commit 9d1c914

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)