mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 15:30:55 +00:00
trezorctl: variable referenced before assignment (fixes #313)
This commit is contained in:
parent
2b02af1126
commit
ca7cbad1cf
27
trezorctl
27
trezorctl
@ -709,22 +709,21 @@ def sign_tx(connect, coin):
|
|||||||
if isinstance(script_type, int)
|
if isinstance(script_type, int)
|
||||||
else CHOICE_INPUT_SCRIPT_TYPE.typemap[script_type]
|
else CHOICE_INPUT_SCRIPT_TYPE.typemap[script_type]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
new_input = proto.TxInputType(
|
||||||
|
address_n=address_n,
|
||||||
|
prev_hash=prev_hash,
|
||||||
|
prev_index=prev_index,
|
||||||
|
amount=amount,
|
||||||
|
script_type=script_type,
|
||||||
|
sequence=sequence,
|
||||||
|
)
|
||||||
if txapi.bip115:
|
if txapi.bip115:
|
||||||
prev_output = txapi.get_tx(prev_hash.hex()).bin_outputs[prev_index]
|
prev_output = txapi.get_tx(prev_hash.hex()).bin_outputs[prev_index]
|
||||||
prev_blockhash = prev_output.block_hash
|
new_input.prev_block_hash_bip115 = prev_output.block_hash
|
||||||
prev_blockheight = prev_output.block_height
|
new_input.prev_block_height_bip115 = prev_output.block_height
|
||||||
inputs.append(
|
|
||||||
proto.TxInputType(
|
inputs.append(new_input)
|
||||||
address_n=address_n,
|
|
||||||
prev_hash=prev_hash,
|
|
||||||
prev_index=prev_index,
|
|
||||||
amount=amount,
|
|
||||||
script_type=script_type,
|
|
||||||
sequence=sequence,
|
|
||||||
prev_block_hash_bip115=prev_blockhash,
|
|
||||||
prev_block_height_bip115=prev_blockheight,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if txapi.bip115:
|
if txapi.bip115:
|
||||||
current_block_height = txapi.current_height()
|
current_block_height = txapi.current_height()
|
||||||
|
Loading…
Reference in New Issue
Block a user