twallet: simplify get_payment_status - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 1ace265992a738023ebb0d8d6d49788925b67772
DIR parent 3766420a0b0bab283bc311fc68f9371a9b7d88db
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Sun, 21 Jun 2020 08:23:07 +0200
wallet: simplify get_payment_status
Diffstat:
M electrum/wallet.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
DIR diff --git a/electrum/wallet.py b/electrum/wallet.py
t@@ -1614,17 +1614,12 @@ class Abstract_Wallet(AddressSynchronizer, ABC):
raise Exception("this wallet cannot delete addresses")
def get_payment_status(self, address, amount):
- local_height = self.get_local_height()
received, sent = self.get_addr_io(address)
l = []
for txo, x in received.items():
h, v, is_cb = x
txid, n = txo.split(':')
- info = self.db.get_verified_tx(txid)
- if info:
- conf = local_height - info.height + 1
- else:
- conf = 0
+ conf = self.get_tx_height(txid).conf
l.append((conf, v))
vsum = 0
for conf, v in reversed(sorted(l)):