electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 27b36486df456f46712a2a4dd275b703f53570f7
parent e5661156f0d4667a91ea60cae5cd8189e0770a92
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:
Melectrum/plugins/keepkey/keepkey.py | 2+-
Melectrum/plugins/trezor/trezor.py | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/electrum/plugins/keepkey/keepkey.py b/electrum/plugins/keepkey/keepkey.py @@ -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: diff --git a/electrum/plugins/trezor/trezor.py b/electrum/plugins/trezor/trezor.py @@ -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: