electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 3089edd3a2533ea22896e253f981bac42f85c7bc
parent f7166e95c4119e67667dbda7fe573b3147b7bce7
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 14 Aug 2018 21:54:11 +0200

wallet: remove method get_num_tx

Diffstat:
Melectrum/address_synchronizer.py | 5+----
Melectrum/wallet.py | 2+-
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py @@ -102,6 +102,7 @@ class AddressSynchronizer(PrintError): return h def get_address_history_len(self, addr: str) -> int: + """Return number of transactions where address is involved.""" return len(self._history_local.get(addr, ())) def get_txin_address(self, txi): @@ -617,10 +618,6 @@ class AddressSynchronizer(PrintError): def is_up_to_date(self): with self.lock: return self.up_to_date - def get_num_tx(self, address): - """ return number of transactions where address is involved """ - return len(self.history.get(address, [])) - def get_tx_delta(self, tx_hash, address): "effect of tx on address" delta = 0 diff --git a/electrum/wallet.py b/electrum/wallet.py @@ -563,7 +563,7 @@ class Abstract_Wallet(AddressSynchronizer): # confirmations. Select the unused addresses within the # gap limit; if none take one at random change_addrs = [addr for addr in addrs if - self.get_num_tx(addr) == 0] + self.get_address_history_len(addr) == 0] if not change_addrs: change_addrs = [random.choice(addrs)] else: