aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-22 20:55:00 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-22 20:55:00 -0500
commitb0c00b0752da456f9bdd0c629e8c703896660fef (patch)
treebd6a84af0850f72d983781598ef45497f757a09a
parentMerge pull request #4225 (diff)
parentsimplewallet: add a warning and prompt on rescan_blockchain (diff)
downloadmonero-b0c00b0752da456f9bdd0c629e8c703896660fef.tar.xz
Merge pull request #4231
3e914ad simplewallet: add a warning and prompt on rescan_blockchain (moneromooo-monero)
-rw-r--r--src/simplewallet/simplewallet.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index e0dbe96e7..139307a90 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2435,7 +2435,7 @@ simple_wallet::simple_wallet()
tr("Show the unspent outputs of a specified address within an optional amount range."));
m_cmd_binder.set_handler("rescan_bc",
boost::bind(&simple_wallet::rescan_blockchain, this, _1),
- tr("Rescan the blockchain from scratch."));
+ tr("Rescan the blockchain from scratch, losing any information which can not be recovered from the blockchain itself."));
m_cmd_binder.set_handler("set_tx_note",
boost::bind(&simple_wallet::set_tx_note, this, _1),
tr("set_tx_note <txid> [free text note]"),
@@ -6821,6 +6821,14 @@ bool simple_wallet::unspent_outputs(const std::vector<std::string> &args_)
//----------------------------------------------------------------------------------------------------
bool simple_wallet::rescan_blockchain(const std::vector<std::string> &args_)
{
+ message_writer() << tr("Warning: this will lose any information which can not be recovered from the blockchain.");
+ message_writer() << tr("This includes destination addresses, tx secret keys, tx notes, etc");
+ std::string confirm = input_line(tr("Rescan anyway ? (Y/Yes/N/No): "));
+ if(!std::cin.eof())
+ {
+ if (!command_line::is_yes(confirm))
+ return true;
+ }
return refresh_main(0, true);
}
//----------------------------------------------------------------------------------------------------