Browse Source

Trezor: fix spending coinbase outputs (#4565)

Attempt to spend coinbase output results in error:
a bytes-like object is required, not 'str'
3.2.x
Yura Pakhuchiy 7 years ago
committed by ghost43
parent
commit
27b36486df
  1. 2
      electrum/plugins/keepkey/keepkey.py
  2. 2
      electrum/plugins/trezor/trezor.py

2
electrum/plugins/keepkey/keepkey.py

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

2
electrum/plugins/trezor/trezor.py

@ -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…
Cancel
Save