electrum

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

commit 98b12715a9b1740756d78f07d2e9c124fb66fb30
parent 983e152ea3313daf18393c3b2126c26fde69e753
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 17 Oct 2016 06:58:01 +0200

remove while loop from wallet.synchronize; we are already in a job

Diffstat:
Mlib/wallet.py | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1475,15 +1475,11 @@ class Deterministic_Wallet(Abstract_Wallet): def synchronize_sequence(self, for_change): limit = self.gap_limit_for_change if for_change else self.gap_limit - while True: - addresses = self.get_change_addresses() if for_change else self.get_receiving_addresses() - if len(addresses) < limit: - self.create_new_address(for_change) - continue - if map(lambda a: self.address_is_old(a), addresses[-limit:] ) == limit*[False]: - break - else: - self.create_new_address(for_change) + addresses = self.get_change_addresses() if for_change else self.get_receiving_addresses() + if len(addresses) < limit: + self.create_new_address(for_change) + elif map(lambda a: self.address_is_old(a), addresses[-limit:]) != limit*[False]: + self.create_new_address(for_change) def synchronize(self): with self.lock: