mirror of
https://github.com/monero-project/monero.git
synced 2025-12-24 06:13:10 +01:00
Merge pull request #5529
de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user