1
0

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:
Yura Pakhuchiy
2018-07-18 22:39:32 +07:00
committed by ghost43
parent e5661156f0
commit 27b36486df
2 changed files with 2 additions and 2 deletions

View File

@@ -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:

View File

@@ -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: