Trezor: fix spending coinbase outputs (#4565)
Attempt to spend coinbase output results in error: a bytes-like object is required, not 'str'
This commit is contained in:
parent
e5661156f0
commit
27b36486df
@ -288,7 +288,7 @@ class KeepKeyPlugin(HW_PluginBase):
|
|||||||
for txin in tx.inputs():
|
for txin in tx.inputs():
|
||||||
txinputtype = self.types.TxInputType()
|
txinputtype = self.types.TxInputType()
|
||||||
if txin['type'] == 'coinbase':
|
if txin['type'] == 'coinbase':
|
||||||
prev_hash = "\0"*32
|
prev_hash = b"\x00"*32
|
||||||
prev_index = 0xffffffff # signed int -1
|
prev_index = 0xffffffff # signed int -1
|
||||||
else:
|
else:
|
||||||
if for_sig:
|
if for_sig:
|
||||||
|
|||||||
@ -362,7 +362,7 @@ class TrezorPlugin(HW_PluginBase):
|
|||||||
for txin in tx.inputs():
|
for txin in tx.inputs():
|
||||||
txinputtype = self.types.TxInputType()
|
txinputtype = self.types.TxInputType()
|
||||||
if txin['type'] == 'coinbase':
|
if txin['type'] == 'coinbase':
|
||||||
prev_hash = "\0"*32
|
prev_hash = b"\x00"*32
|
||||||
prev_index = 0xffffffff # signed int -1
|
prev_index = 0xffffffff # signed int -1
|
||||||
else:
|
else:
|
||||||
if for_sig:
|
if for_sig:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user