X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=electrum;h=e06b2b6c7c78774c1962b60deb030ae3080f09c8;hb=b1472ba1a7aea0817dd445d9906046cad2f12b63;hp=b7fd394e1dfe400d6c27e5485df84554f59c8157;hpb=18c2dba9b879c472792246f24d85825c7999b6ed;p=electrum-nvc.git diff --git a/electrum b/electrum index b7fd394..e06b2b6 100755 --- a/electrum +++ b/electrum @@ -153,13 +153,18 @@ if __name__ == '__main__': #sys.exit("Error: Unknown GUI: " + gui_name ) # network interface - network = Network(config) - network.start() + if not options.offline: + network = Network(config) + network.start() + else: + network = None gui = gui.ElectrumGui(config, network) gui.main(url) - network.stop() + if network: + network.stop() + # we use daemon threads, their termination is enforced. # this sleep command gives them time to terminate cleanly. time.sleep(0.1) @@ -215,17 +220,22 @@ if __name__ == '__main__': wallet.init_seed( str(seed) ) wallet.save_seed() - network = Network(config) - network.start() - wallet.start_threads(network) - - print_msg("Recovering wallet...") - wallet.restore(lambda x: x) - - if wallet.is_found(): - print_msg("Recovery successful") + if not options.offline: + network = Network(config) + network.start() + wallet.start_threads(network) + + print_msg("Recovering wallet...") + wallet.restore(lambda x: x) + + if wallet.is_found(): + print_msg("Recovery successful") + else: + print_msg("Warning: Found no history for this wallet") else: - print_msg("Warning: Found no history for this wallet") + wallet.create_accounts() + wallet.synchronize() + print_msg("Warning: This wallet was restored offline. It may contain more addresses than displayed.") else: wallet.init_seed(None)