diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-10-10 10:43:36 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-14 13:12:42 +0000 |
commit | 2677ade5023a05e97375ee3d97e2c4aab6c54b8f (patch) | |
tree | a2224ca3ba701cf114cb288696b366856863a446 | |
parent | simplewallet: reject attempts to use too low mixin early (diff) | |
download | monero-2677ade5023a05e97375ee3d97e2c4aab6c54b8f.tar.xz |
simplewallet: forbid 0 ring size
It'd be interpreted as a huge one (~0 fake outs)
Diffstat (limited to '')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 7a3d80058..f1a3aac51 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2585,6 +2585,11 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri if (fake_outs_count == 0) fake_outs_count = DEFAULT_MIX; } + else if (ring_size == 0) + { + fail_msg_writer() << tr("Ring size must not be 0"); + return true; + } else { 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) fake_outs_count = DEFAULT_MIX; } + else if (ring_size == 0) + { + fail_msg_writer() << tr("Ring size must not be 0"); + return true; + } else { fake_outs_count = ring_size - 1; |