fix coinbase detection

This commit is contained in:
zebra-lucky 2018-06-29 12:42:41 +03:00
parent fcc7de66cd
commit 5946939c91
1 changed files with 1 additions and 1 deletions

View File

@ -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