Browse Source

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

283
ThomasV 8 years ago
parent
commit
98b12715a9
  1. 14
      lib/wallet.py

14
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:

Loading…
Cancel
Save