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:
@@ -288,7 +288,7 @@ class KeepKeyPlugin(HW_PluginBase):
|
||||
for txin in tx.inputs():
|
||||
txinputtype = self.types.TxInputType()
|
||||
if txin['type'] == 'coinbase':
|
||||
prev_hash = "\0"*32
|
||||
prev_hash = b"\x00"*32
|
||||
prev_index = 0xffffffff # signed int -1
|
||||
else:
|
||||
if for_sig:
|
||||
|
||||
@@ -362,7 +362,7 @@ class TrezorPlugin(HW_PluginBase):
|
||||
for txin in tx.inputs():
|
||||
txinputtype = self.types.TxInputType()
|
||||
if txin['type'] == 'coinbase':
|
||||
prev_hash = "\0"*32
|
||||
prev_hash = b"\x00"*32
|
||||
prev_index = 0xffffffff # signed int -1
|
||||
else:
|
||||
if for_sig:
|
||||
|
||||
Reference in New Issue
Block a user