Skip to content

Commit 5ff7c9c

Browse files
committed
Fix finalizer check for sh(wpkh)
We should check at the witness script hashes to redeem script in the nested sh wsh case. Not the script pubkey
1 parent 40022ff commit 5ff7c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/psbt/finalizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ fn get_descriptor(psbt: &Psbt, index: usize) -> Result<Descriptor<PublicKey>, In
236236
let pk = bitcoin::PublicKey::new(pk);
237237
let addr = bitcoin::Address::p2wpkh(&pk, bitcoin::Network::Bitcoin)
238238
.expect("Address corresponding to valid pubkey");
239-
*script_pubkey == addr.script_pubkey()
239+
*redeem_script == addr.script_pubkey()
240240
})
241241
.next();
242242
match partial_sig_contains_pk {

0 commit comments

Comments
 (0)