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 538d5b613cd8ef6d8f8acb9fe5c0c0c5eaee6da1
parent 0b5d3c7909a8111a6484a881add0f6eae42c1765
Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date:   Fri, 15 Jun 2018 15:26:34 +0100

Fix bug when using getrawtransaction on 0conf tx

The easiest way to fix issue #30. Sometimes the results of
getrawtransaction doesnt contain `confirmations`.

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

diff --git a/electrumpersonalserver/transactionmonitor.py b/electrumpersonalserver/transactionmonitor.py @@ -212,7 +212,7 @@ class TransactionMonitor(object): rawtx = self.rpc.call("getrawtransaction", [inn["txid"], True]) if rawtx is not None: - utxo = {"confirmations": rawtx["confirmations"], + utxo = {"confirmations": 0, "value": rawtx["vout"][inn["vout"]]["value"]} if utxo is not None: total_input_value += int(Decimal(utxo["value"]) *