aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/output_selection.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-07-24 14:06:11 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-07-24 14:06:11 -0500
commit7fc76451a5bc3b9f6a08eaa3f9bb31d450ee79a3 (patch)
tree720ec93a89696ce7f97fc01121cb341809be086b /tests/unit_tests/output_selection.cpp
parentMerge pull request #5528 (diff)
parentuse crypto::rand instead of libc rand in a few tests (diff)
downloadmonero-7fc76451a5bc3b9f6a08eaa3f9bb31d450ee79a3.tar.xz
Merge pull request #5529
de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
Diffstat (limited to 'tests/unit_tests/output_selection.cpp')
-rw-r--r--tests/unit_tests/output_selection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit_tests/output_selection.cpp b/tests/unit_tests/output_selection.cpp
index 235b1c809..c98696fbd 100644
--- a/tests/unit_tests/output_selection.cpp
+++ b/tests/unit_tests/output_selection.cpp
@@ -138,7 +138,7 @@ TEST(select_outputs, density)
static const size_t NPICKS = 1000000;
std::vector<uint64_t> offsets;
- MKOFFSETS(300000, 1 + (rand() & 0x1f));
+ MKOFFSETS(300000, 1 + (crypto::rand<size_t>() & 0x1f));
tools::gamma_picker picker(offsets);
std::vector<int> picks(/*n_outs*/offsets.size(), 0);
@@ -181,7 +181,7 @@ TEST(select_outputs, same_distribution)
static const size_t NPICKS = 1000000;
std::vector<uint64_t> offsets;
- MKOFFSETS(300000, 1 + (rand() & 0x1f));
+ MKOFFSETS(300000, 1 + (crypto::rand<size_t>() & 0x1f));
tools::gamma_picker picker(offsets);
std::vector<int> chain_picks(offsets.size(), 0);