mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 01:39:27 -05:00
Merge pull request #2796
b42ee213
Wallet: update ring size in outdated error msgs with set_default_ring_size (binaryFate)
This commit is contained in:
commit
eefd6a7878
@ -80,6 +80,8 @@ typedef cryptonote::simple_wallet sw;
|
|||||||
|
|
||||||
#define DEFAULT_MIX 4
|
#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 OUTPUT_EXPORT_FILE_MAGIC "Monero output export\003"
|
||||||
|
|
||||||
#define LOCK_IDLE_SCOPE() \
|
#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(), '-'))
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
uint32_t ring_size = boost::lexical_cast<uint32_t>(args[1]);
|
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;
|
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 &)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
catch(...)
|
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("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("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("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("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("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"));
|
CHECK_SIMPLE_VARIABLE("priority", set_default_priority, tr("0, 1, 2, 3, or 4"));
|
||||||
|
Loading…
Reference in New Issue
Block a user