tdeserialize: catch exception raised by coinbase transactions - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 8d339bfc1a8daa3de91c9d3df0ac3888794bb555
DIR parent aee3918c363d0278df504a7115a20c604820780c
HTML Author: ecdsa <ecdsa@github>
Date: Mon, 25 Mar 2013 02:52:59 +0100
deserialize: catch exception raised by coinbase transactions
Diffstat:
M lib/deserialize.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
DIR diff --git a/lib/deserialize.py b/lib/deserialize.py
t@@ -323,7 +323,11 @@ def match_decoded(decoded, to_match):
return True
def get_address_from_input_script(bytes):
- decoded = [ x for x in script_GetOp(bytes) ]
+ try:
+ decoded = [ x for x in script_GetOp(bytes) ]
+ except:
+ print_error("cannot find address in input script", bytes.encode('hex'))
+ return [], [], "(None)"
# non-generated TxIn transactions push a signature
# (seventy-something bytes) and then their public key