mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 13:09:24 +00:00
simplewallet: forbid 0 ring size
It'd be interpreted as a huge one (~0 fake outs)
This commit is contained in:
parent
da8b60cbbf
commit
2677ade502
1 changed files with 10 additions and 0 deletions
|
@ -2585,6 +2585,11 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
||||||
if (fake_outs_count == 0)
|
if (fake_outs_count == 0)
|
||||||
fake_outs_count = DEFAULT_MIX;
|
fake_outs_count = DEFAULT_MIX;
|
||||||
}
|
}
|
||||||
|
else if (ring_size == 0)
|
||||||
|
{
|
||||||
|
fail_msg_writer() << tr("Ring size must not be 0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fake_outs_count = ring_size - 1;
|
fake_outs_count = ring_size - 1;
|
||||||
|
@ -3196,6 +3201,11 @@ bool simple_wallet::sweep_main(uint64_t below, const std::vector<std::string> &a
|
||||||
if (fake_outs_count == 0)
|
if (fake_outs_count == 0)
|
||||||
fake_outs_count = DEFAULT_MIX;
|
fake_outs_count = DEFAULT_MIX;
|
||||||
}
|
}
|
||||||
|
else if (ring_size == 0)
|
||||||
|
{
|
||||||
|
fail_msg_writer() << tr("Ring size must not be 0");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fake_outs_count = ring_size - 1;
|
fake_outs_count = ring_size - 1;
|
||||||
|
|
Loading…
Reference in a new issue