diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-04-02 12:05:57 +0900 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-04-02 12:05:57 +0900 |
commit | cc54e2764aba1687b55bd01b2798ffb17dc581a2 (patch) | |
tree | b19ec3cb9f394d62c0924f54a51bf33834f57404 /src | |
parent | Merge pull request #778 (diff) | |
parent | core: remove the block reward accumulation loop (diff) | |
download | monero-cc54e2764aba1687b55bd01b2798ffb17dc581a2.tar.xz |
Merge pull request #779
daac1cc core: remove the block reward accumulation loop (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/cryptonote_format_utils.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 3c1acd8a9..94f3d51d2 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -145,11 +145,7 @@ namespace cryptonote [&out_amounts](uint64_t a_dust) { out_amounts.push_back(a_dust); }); CHECK_AND_ASSERT_MES(1 <= max_outs, false, "max_out must be non-zero"); - while (max_outs < out_amounts.size()) - { - out_amounts[out_amounts.size() - 2] += out_amounts.back(); - out_amounts.resize(out_amounts.size() - 1); - } + CHECK_AND_ASSERT_MES(max_outs >= out_amounts.size(), false, "max_out exceeded"); uint64_t summary_amounts = 0; for (size_t no = 0; no < out_amounts.size(); no++) |