tTrezor: fix spending coinbase outputs (#4565) - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 27b36486df456f46712a2a4dd275b703f53570f7 DIR parent e5661156f0d4667a91ea60cae5cd8189e0770a92 HTML Author: Yura Pakhuchiy <pakhuchiy@gmail.com> Date: Wed, 18 Jul 2018 22:39:32 +0700 Trezor: fix spending coinbase outputs (#4565) Attempt to spend coinbase output results in error: a bytes-like object is required, not 'str' Diffstat: M electrum/plugins/keepkey/keepkey.py | 2 +- M electrum/plugins/trezor/trezor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/plugins/keepkey/keepkey.py b/electrum/plugins/keepkey/keepkey.py t@@ -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: DIR diff --git a/electrum/plugins/trezor/trezor.py b/electrum/plugins/trezor/trezor.py t@@ -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: