input_script: return txin.scriptSig if available. replace txin.is_coinbase with type. fixes #2321
This commit is contained in:
@@ -366,7 +366,7 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
|
||||
|
||||
# Build hasharray from inputs
|
||||
for i, txin in enumerate(tx.inputs()):
|
||||
if txin.get('is_coinbase'):
|
||||
if txin['type'] == 'coinbase':
|
||||
self.give_error("Coinbase not supported") # should never happen
|
||||
|
||||
if txin['type'] in ['p2sh']:
|
||||
|
||||
@@ -275,7 +275,7 @@ class Ledger_KeyStore(Hardware_KeyStore):
|
||||
# Fetch inputs of the transaction to sign
|
||||
derivations = self.get_tx_derivations(tx)
|
||||
for txin in tx.inputs():
|
||||
if txin.get('is_coinbase'):
|
||||
if txin['type'] == 'coinbase':
|
||||
self.give_error("Coinbase not supported") # should never happen
|
||||
|
||||
if txin['type'] in ['p2sh']:
|
||||
|
||||
@@ -259,7 +259,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
|
||||
inputs = []
|
||||
for txin in tx.inputs():
|
||||
txinputtype = self.types.TxInputType()
|
||||
if txin.get('is_coinbase'):
|
||||
if txin['type'] == 'coinbase':
|
||||
prev_hash = "\0"*32
|
||||
prev_index = 0xffffffff # signed int -1
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user