From 5946939c91205a5fe9702dfae1442561b8403ae9 Mon Sep 17 00:00:00 2001 From: zebra-lucky Date: Fri, 29 Jun 2018 12:42:41 +0300 Subject: [PATCH] fix coinbase detection --- lib/wallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wallet.py b/lib/wallet.py index 49edea22..099ccecb 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -828,7 +828,7 @@ class Abstract_Wallet(PrintError): # BUT we track is_mine inputs in a txn, and during subsequent calls # of add_transaction tx, we might learn of more-and-more inputs of # being is_mine, as we roll the gap_limit forward - is_coinbase = tx.inputs()[0]['type'] == 'coinbase' + is_coinbase = len(tx.inputs()) and tx.inputs()[0]['type'] == 'coinbase' tx_height = self.get_tx_height(tx_hash)[0] is_mine = any([self.is_mine(txin['address']) for txin in tx.inputs()]) # do not save if tx is local and not mine