electrum-personal-server

Maximally lightweight electrum server for a single user
git clone https://git.parazyd.org/electrum-personal-server
Log | Files | Refs | README

commit a057f49693a05187b0a898cc348176513ffcee37
parent a0a6851c1910b1749cab409b967a7ad6698adce8
Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date:   Fri, 22 Jun 2018 16:12:38 +0100

Fix failed test for when listtransactions = []

The last commit broke a test. The code crashes when listtransactions
returns an empty list

Diffstat:
Melectrumpersonalserver/transactionmonitor.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/electrumpersonalserver/transactionmonitor.py b/electrumpersonalserver/transactionmonitor.py @@ -104,7 +104,7 @@ class TransactionMonitor(object): ret = self.rpc.call("listtransactions", ["*", BATCH_SIZE, t, True]) self.debug("listtransactions skip=" + str(t) + " len(ret)=" + str(len(ret))) - if t == 0: + if t == 0 and len(ret) > 0: last_tx = ret[-1] t += len(ret) for tx in ret: