diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-21 20:29:22 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-21 20:29:22 +0000 |
commit | 6cc7d261406ad38071065a79f66c4366f65b65ba (patch) | |
tree | 4fa07acf8e7e9310877cc6f908cded45b811d0db /src/ringct/rctSigs.cpp | |
parent | Merge pull request #1585 (diff) | |
download | monero-6cc7d261406ad38071065a79f66c4366f65b65ba.tar.xz |
ringct: reorder a bit to check quicker tests first
Diffstat (limited to 'src/ringct/rctSigs.cpp')
-rw-r--r-- | src/ringct/rctSigs.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp index 74fed0ede..b8f3596e8 100644 --- a/src/ringct/rctSigs.cpp +++ b/src/ringct/rctSigs.cpp @@ -797,23 +797,6 @@ namespace rct { tools::thread_group threadpool(tools::thread_group::optimal_with_max(threads)); if (semantics) { - results.clear(); - results.resize(rv.outPk.size()); - tools::task_region(threadpool, [&] (tools::task_region_handle& region) { - for (size_t i = 0; i < rv.outPk.size(); i++) { - region.run([&, i] { - results[i] = verRange(rv.outPk[i].mask, rv.p.rangeSigs[i]); - }); - } - }); - - for (size_t i = 0; i < results.size(); ++i) { - if (!results[i]) { - LOG_PRINT_L1("Range proof verified failed for output " << i); - return false; - } - } - key sumOutpks = identity(); for (size_t i = 0; i < rv.outPk.size(); i++) { addKeys(sumOutpks, sumOutpks, rv.outPk[i].mask); @@ -833,6 +816,23 @@ namespace rct { LOG_PRINT_L1("Sum check failed"); return false; } + + results.clear(); + results.resize(rv.outPk.size()); + tools::task_region(threadpool, [&] (tools::task_region_handle& region) { + for (size_t i = 0; i < rv.outPk.size(); i++) { + region.run([&, i] { + results[i] = verRange(rv.outPk[i].mask, rv.p.rangeSigs[i]); + }); + } + }); + + for (size_t i = 0; i < results.size(); ++i) { + if (!results[i]) { + LOG_PRINT_L1("Range proof verified failed for output " << i); + return false; + } + } } else { const key message = get_pre_mlsag_hash(rv); |