mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
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.
This commit is contained in:
parent
0fbe9cfcdb
commit
d2644c15c3
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue