electrum

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

commit 9d2e3227608ff44e743184e7df538d102b4c6f37
parent 1fd6aef9c9c759a583310a5770eafb1f6fc55784
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 17 Oct 2016 08:45:52 +0200

revert 98b1271 (it freezes the gui on retsore)

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

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1475,11 +1475,15 @@ class Deterministic_Wallet(Abstract_Wallet): def synchronize_sequence(self, for_change): limit = self.gap_limit_for_change if for_change else self.gap_limit - 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) + 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) def synchronize(self): with self.lock: