mirror of
https://github.com/wownero/wownero.git
synced 2026-10-30 21:08:38 +01:00
simplewallet: prompt for restore height when using generate-from-device
This commit is contained in:
@@ -4297,12 +4297,18 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
|
|||||||
wrt << tr("Use --restore-height or --restore-date if you want to restore an already setup account from a specific height.");
|
wrt << tr("Use --restore-height or --restore-date if you want to restore an already setup account from a specific height.");
|
||||||
}
|
}
|
||||||
std::string confirm = input_line(tr("Is this okay?"), true);
|
std::string confirm = input_line(tr("Is this okay?"), true);
|
||||||
if (std::cin.eof() || !command_line::is_yes(confirm))
|
if (std::cin.eof()) CHECK_AND_ASSERT_MES(false, false, tr("account creation aborted"));
|
||||||
CHECK_AND_ASSERT_MES(false, false, tr("account creation aborted"));
|
|
||||||
|
|
||||||
m_wallet->set_refresh_from_block_height(m_wallet->estimate_blockchain_height() > 0 ? m_wallet->estimate_blockchain_height() - 1 : 0);
|
if (command_line::is_yes(confirm))
|
||||||
m_wallet->explicit_refresh_from_block_height(true);
|
{
|
||||||
m_restore_height = m_wallet->get_refresh_from_block_height();
|
m_wallet->set_refresh_from_block_height(m_wallet->estimate_blockchain_height() > 0 ? m_wallet->estimate_blockchain_height() - 1 : 0);
|
||||||
|
m_wallet->explicit_refresh_from_block_height(true);
|
||||||
|
m_restore_height = m_wallet->get_refresh_from_block_height();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_wallet->explicit_refresh_from_block_height(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user