diff options
author | luigi1111 <luigi1111w@gmail.com> | 2016-08-09 17:46:49 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2016-08-09 17:46:49 -0500 |
commit | d2644c15c34a9a9b95aa3051ebbfdd259dced3f3 (patch) | |
tree | adee1bd06402228ecad1f82bf7ac2641af1b7938 /src/simplewallet/simplewallet.cpp | |
parent | Merge pull request #937 (diff) | |
download | monero-d2644c15c34a9a9b95aa3051ebbfdd259dced3f3.tar.xz |
fix restore-deterministic height
Simplewallet improperly skipped the restore from height code if
restoring a deterministic wallet AND not specifying a wallet file in the
command line. The other generate options require a wallet file as an
argument, which prevents "ask_wallet_create_if_needed()" from being
called, which in turn causes "m_generate_new" to remain unset.
Specifying a wallet file at launch with --restore-deterministic emulated
this behavior.
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a3a4685b5..2d2de89b0 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1259,7 +1259,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) return false; } } - if (!m_restore_height && m_generate_new.empty()) + if (!m_restore_height && (m_generate_new.empty() || m_restore_deterministic_wallet)) { std::string heightstr = command_line::input_line("Restore from specific blockchain height (optional, default 0): "); if (std::cin.eof()) @@ -1546,7 +1546,7 @@ bool simple_wallet::new_wallet(const std::string &wallet_file, const std::string m_wallet->set_seed_language(mnemonic_language); // for a totally new account, we don't care about older blocks. - if (!m_generate_new.empty()) + if (!m_generate_new.empty() && !m_restore_deterministic_wallet) { std::string err; m_wallet->set_refresh_from_block_height(get_daemon_blockchain_height(err)); |