Skip to content

Commit bb9f2a0

Browse files
committed
psbt finalizer code cleanup
1 parent f8dc749 commit bb9f2a0

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/psbt/finalizer.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,20 +274,11 @@ pub fn finalize_helper<C: secp256k1::Verification>(
274274
for (n, input) in psbt.inputs.iter().enumerate() {
275275
let target = input.sighash_type.unwrap_or(bitcoin::EcdsaSigHashType::All);
276276
for (key, ecdsa_sig) in &input.partial_sigs {
277-
let flag = bitcoin::EcdsaSigHashType::from_u32_standard(ecdsa_sig.hash_ty as u32)
278-
.map_err(|_| {
279-
super::Error::InputError(
280-
InputError::Interpreter(interpreter::Error::NonStandardSigHash(
281-
ecdsa_sig.to_vec(),
282-
)),
283-
n,
284-
)
285-
})?;
286-
if target != flag {
277+
if target != ecdsa_sig.hash_ty {
287278
return Err(Error::InputError(
288279
InputError::WrongSigHashFlag {
289280
required: target,
290-
got: flag,
281+
got: ecdsa_sig.hash_ty,
291282
pubkey: *key,
292283
},
293284
n,

0 commit comments

Comments
 (0)