transaction: change Transaction.is_segwit_input(txin) to txin.is_segwit()
This commit is contained in:
@@ -53,7 +53,7 @@ class KeepKey_KeyStore(Hardware_KeyStore):
|
||||
prev_tx = {}
|
||||
for txin in tx.inputs():
|
||||
tx_hash = txin.prevout.txid.hex()
|
||||
if txin.utxo is None and not Transaction.is_segwit_input(txin):
|
||||
if txin.utxo is None and not txin.is_segwit():
|
||||
raise UserFacingException(_('Missing previous tx for legacy input.'))
|
||||
prev_tx[tx_hash] = txin.utxo
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ class Ledger_KeyStore(Hardware_KeyStore):
|
||||
|
||||
redeemScript = Transaction.get_preimage_script(txin)
|
||||
txin_prev_tx = txin.utxo
|
||||
if txin_prev_tx is None and not Transaction.is_segwit_input(txin):
|
||||
if txin_prev_tx is None and not txin.is_segwit():
|
||||
raise UserFacingException(_('Missing previous tx for legacy input.'))
|
||||
txin_prev_tx_raw = txin_prev_tx.serialize() if txin_prev_tx else None
|
||||
inputs.append([txin_prev_tx_raw,
|
||||
|
||||
@@ -51,7 +51,7 @@ class SafeTKeyStore(Hardware_KeyStore):
|
||||
prev_tx = {}
|
||||
for txin in tx.inputs():
|
||||
tx_hash = txin.prevout.txid.hex()
|
||||
if txin.utxo is None and not Transaction.is_segwit_input(txin):
|
||||
if txin.utxo is None and not txin.is_segwit():
|
||||
raise UserFacingException(_('Missing previous tx for legacy input.'))
|
||||
prev_tx[tx_hash] = txin.utxo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user