add a lock to wallet.synchronize() and fix #1049
This commit is contained in:
parent
9e4eda24b5
commit
58f9ab3492
|
@ -251,6 +251,9 @@ class ElectrumWindow(QMainWindow):
|
|||
except Exception as e:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
self.show_message(str(e))
|
||||
# call synchronize to regenerate addresses in case we are offline
|
||||
if self.wallet.get_master_public_keys() and self.wallet.addresses() == []:
|
||||
self.wallet.synchronize()
|
||||
|
||||
|
||||
def open_wallet(self):
|
||||
|
|
|
@ -1203,6 +1203,7 @@ class Deterministic_Wallet(Abstract_Wallet):
|
|||
self.save_accounts()
|
||||
|
||||
def synchronize(self):
|
||||
with self.lock:
|
||||
for account in self.accounts.values():
|
||||
account.synchronize(self)
|
||||
|
||||
|
|
Loading…
Reference in New Issue