mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
trezorctl: fix bip115 handling
This commit is contained in:
parent
e52cbed7be
commit
1a239201d8
12
trezorctl
12
trezorctl
@ -833,10 +833,14 @@ def sign_tx(connect, coin):
|
||||
|
||||
if txapi.bip115:
|
||||
current_block_height = txapi.current_height()
|
||||
block_height = (
|
||||
current_block_height - 300
|
||||
) # Zencash recommendation for the better protection
|
||||
# Zencash recommendation for the better protection
|
||||
block_height = current_block_height - 300
|
||||
block_hash = txapi.get_block_hash(block_height)
|
||||
# Blockhash passed in reverse order
|
||||
block_hash = block_hash[::-1]
|
||||
else:
|
||||
block_height = None
|
||||
block_hash = None
|
||||
|
||||
outputs = []
|
||||
while True:
|
||||
@ -868,7 +872,7 @@ def sign_tx(connect, coin):
|
||||
address=address,
|
||||
amount=amount,
|
||||
script_type=script_type,
|
||||
block_hash_bip115=block_hash[::-1], # Blockhash passed in reverse order
|
||||
block_hash_bip115=block_hash,
|
||||
block_height_bip115=block_height,
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user