URI: 
       tadd a lock to wallet.synchronize() and fix #1049 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 58f9ab3492dfb9f7401f92db6b75f97819e1e5d8
   DIR parent 9e4eda24b5d2e25655a7be72e5ecb495c25c22c8
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Fri, 13 Mar 2015 16:51:31 +0100
       
       add a lock to wallet.synchronize() and fix #1049
       
       Diffstat:
         M gui/qt/main_window.py               |       3 +++
         M lib/wallet.py                       |       5 +++--
       
       2 files changed, 6 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -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):
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -1203,8 +1203,9 @@ class Deterministic_Wallet(Abstract_Wallet):
                self.save_accounts()
        
            def synchronize(self):
       -        for account in self.accounts.values():
       -            account.synchronize(self)
       +        with self.lock:
       +            for account in self.accounts.values():
       +                account.synchronize(self)
        
            def restore(self, callback):
                from i18n import _