Skip to content

Commit

Permalink
[REF] Ignore extra signatures when creating unlocking script
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Aug 9, 2023
1 parent bf6f435 commit 912d50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitcoinlib/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def update_scripts(self, hash_type=SIGHASH_ALL):
if b'' in signatures:
raise TransactionError("Empty signature found in signature list when signing. "
"Is DER encoded version of signature defined?")
if len(signatures) == self.sigs_required: # and not self.unlocking_script
if len(signatures) and len(signatures) >= self.sigs_required: # and not self.unlocking_script
unlock_script_obj = Script(script_types=['p2sh_multisig'], keys=[k.public_byte for k in self.keys],
signatures=self.signatures[:self.sigs_required],
sigs_required=self.sigs_required, redeemscript=self.redeemscript)
Expand Down

0 comments on commit 912d50d

Please sign in to comment.