WalletSynchronizer had a race condition caused by calling the callback before the Qt event loop (or other initialisation) finished. Ergo we split initialisation and the running of the thread, then use Qt SIGNALs to yield back into the Qt event loop. This ensures that the callback for the servers_list_changed is not called until the main Qt event loop is actually running.
This commit is contained in:
3
electrum
3
electrum
@@ -173,7 +173,8 @@ if __name__ == '__main__':
|
||||
sys.exit("Error: Unknown GUI: " + options.gui)
|
||||
|
||||
gui = gui.ElectrumGui(wallet)
|
||||
WalletSynchronizer(wallet,True).start()
|
||||
interface = WalletSynchronizer(wallet, True, gui.server_list_changed)
|
||||
interface.start()
|
||||
|
||||
try:
|
||||
found = wallet.file_exists
|
||||
|
||||
Reference in New Issue
Block a user