commit 5d9efaf5c024e40f090274c6b7e52dd9b9357935
parent 5fd8f86b792a14aefb891366ee15390a0c5fc70f
Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date: Wed, 4 Jul 2018 22:43:48 +0100
Correctly tolerate listtxes having no addr field
Commit `2a0d918a` intended to tolerate listtransactions having no
address but this was not done in all locations, leading to crashes.
Should hopefully fix issue #31 for good now.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/electrumpersonalserver/transactionmonitor.py b/electrumpersonalserver/transactionmonitor.py
@@ -406,7 +406,7 @@ class TransactionMonitor(object):
#TODO low priority: handle a user getting more than 255 new
# transactions in 15 seconds
self.debug("recent tx index = " + str(recent_tx_index) + " ret = " +
- str([(t["txid"], t["address"]) for t in ret]))
+ str([(t["txid"], t.get("address", None)) for t in ret]))
if len(ret) > 0:
self.last_known_wallet_txid = (ret[0]["txid"],
ret[0].get("address", None))