tprotocol/listunspent: Set height to 0 if tx is in mempool. - obelisk - Electrum server using libbitcoin as its backend HTML git clone https://git.parazyd.org/obelisk DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 4eb88b8f6066b303e804ad0212645dae3d6ae124 DIR parent eec7afe359164f0bb0aab3df1a46c90e21c1dceb HTML Author: parazyd <parazyd@dyne.org> Date: Mon, 19 Apr 2021 11:00:43 +0200 protocol/listunspent: Set height to 0 if tx is in mempool. Diffstat: M obelisk/protocol.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- DIR diff --git a/obelisk/protocol.py b/obelisk/protocol.py t@@ -412,7 +412,6 @@ class ElectrumProtocol(asyncio.Protocol): # pylint: disable=R0904,R0902 self.log.debug("Got error: %s", repr(_ec)) return JsonRPCError.internalerror() - # TODO: Check mempool ret = [] for i in utxo: rec = i["received"] t@@ -420,7 +419,7 @@ class ElectrumProtocol(asyncio.Protocol): # pylint: disable=R0904,R0902 "tx_pos": rec["index"], "value": i["value"], "tx_hash": hash_to_hex_str(rec["hash"]), - "height": rec["height"], + "height": rec["height"] if rec["height"] != 4294967295 else 0, }) return {"result": ret}