Skip to content

Commit 983b889

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 6cd1fb6 commit 983b889

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)