electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 142b5532ec8230d0791451d254b440d0b390b28a
parent ca9eb508217c7d379a1af656db9776feb9e42903
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 28 Oct 2015 11:11:41 +0100

revert to previous restore method, without daemon

Diffstat:
Melectrum | 14+++++++++++++-
Mlib/commands.py | 7-------
2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/electrum b/electrum @@ -147,7 +147,18 @@ def init_cmdline(config): wallet = Wallet.from_text(text, password, storage) except BaseException as e: sys.exit(str(e)) - wallet.synchronize() + if not config.get('offline'): + network = Network(config) + network.start() + wallet.start_threads(network) + print_msg("Recovering wallet...") + wallet.synchronize() + wallet.restore(lambda x: x) + msg = "Recovery successful" if wallet.is_found() else "Found no history for this wallet" + else: + msg = "This wallet was restored offline. It may contain more addresses than displayed." + print_msg(msg) + else: password = password_dialog() wallet = Wallet(storage) @@ -160,6 +171,7 @@ def init_cmdline(config): print_msg("Please keep it in a safe place; if you lose it, you will not be able to restore your wallet.") print_msg("Wallet saved in '%s'" % wallet.storage.path) + sys.exit(0) else: if cmd.requires_wallet and not storage.file_exists: diff --git a/lib/commands.py b/lib/commands.py @@ -101,7 +101,6 @@ class Commands: @command('') def create(self): """Create a new wallet""" - return True @command('wn') def restore(self, text): @@ -109,12 +108,6 @@ class Commands: public key, a master private key, a list of bitcoin addresses or bitcoin private keys. If you want to be prompted for your seed, type '?' or ':' (concealed) """ - self.wallet.restore(lambda x: x) - if self.network: - msg = "Recovery successful" if self.wallet.is_found() else "Found no history for this wallet" - else: - msg = "This wallet was restored offline. It may contain more addresses than displayed." - return msg @command('w') def deseed(self):