aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-11-25 19:49:48 +0200
committerRiccardo Spagni <ric@spagni.net>2017-11-25 19:49:48 +0200
commiteefd6a787818ea7bf7052b1617dcddc686883861 (patch)
tree4495480500f02a41799c2bbaffd733ce36891927 /src/simplewallet
parentMerge pull request #2784 (diff)
parentWallet: update ring size in outdated error msgs with set_default_ring_size (diff)
downloadmonero-eefd6a787818ea7bf7052b1617dcddc686883861.tar.xz
Merge pull request #2796
b42ee213 Wallet: update ring size in outdated error msgs with set_default_ring_size (binaryFate)
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 068fb7eb3..ff5255a80 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -80,6 +80,8 @@ typedef cryptonote::simple_wallet sw;
#define DEFAULT_MIX 4
+#define MIN_RING_SIZE 5 // Used to inform user about min ring size -- does not track actual protocol
+
#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\003"
#define LOCK_IDLE_SCOPE() \
@@ -619,13 +621,13 @@ bool simple_wallet::set_default_ring_size(const std::vector<std::string> &args/*
{
if (strchr(args[1].c_str(), '-'))
{
- fail_msg_writer() << tr("ring size must be an integer >= 3");
+ fail_msg_writer() << tr("ring size must be an integer >= ") << MIN_RING_SIZE;
return true;
}
uint32_t ring_size = boost::lexical_cast<uint32_t>(args[1]);
- if (ring_size < 3 && ring_size != 0)
+ if (ring_size < MIN_RING_SIZE && ring_size != 0)
{
- fail_msg_writer() << tr("ring size must be an integer >= 3");
+ fail_msg_writer() << tr("ring size must be an integer >= ") << MIN_RING_SIZE;
return true;
}
@@ -639,7 +641,7 @@ bool simple_wallet::set_default_ring_size(const std::vector<std::string> &args/*
}
catch(const boost::bad_lexical_cast &)
{
- fail_msg_writer() << tr("ring size must be an integer >= 3");
+ fail_msg_writer() << tr("ring size must be an integer >= ") << MIN_RING_SIZE;
return true;
}
catch(...)
@@ -1011,7 +1013,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
CHECK_SIMPLE_VARIABLE("always-confirm-transfers", set_always_confirm_transfers, tr("0 or 1"));
CHECK_SIMPLE_VARIABLE("print-ring-members", set_print_ring_members, tr("0 or 1"));
CHECK_SIMPLE_VARIABLE("store-tx-info", set_store_tx_info, tr("0 or 1"));
- CHECK_SIMPLE_VARIABLE("default-ring-size", set_default_ring_size, tr("integer >= 3"));
+ CHECK_SIMPLE_VARIABLE("default-ring-size", set_default_ring_size, tr("integer >= ") << MIN_RING_SIZE);
CHECK_SIMPLE_VARIABLE("auto-refresh", set_auto_refresh, tr("0 or 1"));
CHECK_SIMPLE_VARIABLE("refresh-type", set_refresh_type, tr("full (slowest, no assumptions); optimize-coinbase (fast, assumes the whole coinbase is paid to a single address); no-coinbase (fastest, assumes we receive no coinbase transaction), default (same as optimize-coinbase)"));
CHECK_SIMPLE_VARIABLE("priority", set_default_priority, tr("0, 1, 2, 3, or 4"));