aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-06-18 17:27:52 +0200
committerRiccardo Spagni <ric@spagni.net>2017-06-18 17:27:52 +0200
commitfb7d6db0514939f26063063b388f95da00ccff1c (patch)
tree71995bfe11ceb50bd20390691a4c3d3d42d8a1cd
parentMerge pull request #2074 (diff)
parentadd simplewallet --generate-new-wallet arg checks (diff)
downloadmonero-fb7d6db0514939f26063063b388f95da00ccff1c.tar.xz
Merge pull request #2076
ac0714dc add simplewallet --generate-new-wallet arg checks (Michael Shick)
-rw-r--r--src/simplewallet/simplewallet.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 87dbcf513..13dfcb6a4 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -929,6 +929,11 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
fail_msg_writer() << tr("can't specify both --restore-deterministic-wallet and --non-deterministic");
return false;
}
+ if (!m_wallet_file.empty())
+ {
+ fail_msg_writer() << tr("--restore-deterministic-wallet uses --generate-new-wallet, not --wallet-file");
+ return false;
+ }
if (m_electrum_seed.empty())
{
@@ -1090,6 +1095,10 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
}
else
{
+ if (m_generate_new.empty()) {
+ fail_msg_writer() << tr("specify a wallet path with --generate-new-wallet (not --wallet-file)");
+ return false;
+ }
m_wallet_file = m_generate_new;
bool r = new_wallet(vm, m_recovery_key, m_restore_deterministic_wallet, m_non_deterministic, old_language);
CHECK_AND_ASSERT_MES(r, false, tr("account creation failed"));