From 0aee9bbbb0c6da74eefbfc9e50a1f2051eb57b5f Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 6 Dec 2017 16:02:40 +0100 Subject: [PATCH] fix spending from multisig (broken by 8be777e8825b0f8c5892dcfa863a9868be96d64e) --- lib/transaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/transaction.py b/lib/transaction.py index 55014e2cb..88314f466 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -631,9 +631,9 @@ class Transaction: def estimate_pubkey_size_for_txin(cls, txin): pubkeys = txin.get('pubkeys', []) x_pubkeys = txin.get('x_pubkeys', []) - if len(pubkeys) > 0: + if pubkeys and len(pubkeys) > 0: return cls.estimate_pubkey_size_from_x_pubkey(pubkeys[0]) - elif len(x_pubkeys) > 0: + elif x_pubkeys and len(x_pubkeys) > 0: return cls.estimate_pubkey_size_from_x_pubkey(x_pubkeys[0]) else: return 0x21 # just guess it is compressed