input_script: return txin.scriptSig if available. replace txin.is_coinbase with type. fixes #2321
This commit is contained in:
@@ -582,13 +582,13 @@ class Abstract_Wallet(PrintError):
|
||||
return addr
|
||||
|
||||
def add_transaction(self, tx_hash, tx):
|
||||
is_coinbase = tx.inputs()[0].get('is_coinbase') == True
|
||||
is_coinbase = tx.inputs()[0]['type'] == 'coinbase'
|
||||
with self.transaction_lock:
|
||||
# add inputs
|
||||
self.txi[tx_hash] = d = {}
|
||||
for txi in tx.inputs():
|
||||
addr = txi.get('address')
|
||||
if not txi.get('is_coinbase'):
|
||||
if txi['type'] != 'coinbase':
|
||||
prevout_hash = txi['prevout_hash']
|
||||
prevout_n = txi['prevout_n']
|
||||
ser = prevout_hash + ':%d'%prevout_n
|
||||
|
||||
Reference in New Issue
Block a user