From d51ef7eb720de1fd562fb16f5c1423391b725f85 Mon Sep 17 00:00:00 2001 From: Bjarne Magnussen Date: Sat, 20 Oct 2018 14:32:57 +0200 Subject: [PATCH] Fixes Input_Finalizer to find P2PKH signatures in PSBT I think the indentation was wrong as otherwise Input_Finalizer will always be unable to find signatures for P2PKH inputs inside PSBTs --- psbt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/psbt.py b/psbt.py index 8a4d62b..9263808 100644 --- a/psbt.py +++ b/psbt.py @@ -743,9 +743,9 @@ def __init__(self, serialized_psbt): # More than one partial sig should not be found without a redeemScript or # witnessScript. Must be missing a script continue - sec = k[1:] - sig = i[k] - found_sec = True + sec = k[1:] + sig = i[k] + found_sec = True # Take the SEC and sig and construct the scriptSig # Add key-type PSBT_IN_FINAL_SCRIPTSIG to PSBT with the finalized scriptSig as its value i[PSBT_IN_FINAL_SCRIPTSIG] = Script([sig, sec]).serialize()