Merge pull request #5529

de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
This commit is contained in:
luigi1111 2019-07-24 14:06:11 -05:00
commit 7fc76451a5
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 8 additions and 8 deletions

View file

@ -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);