mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 17:34:53 -04:00
Merge pull request #5529
de27651
use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
This commit is contained in:
commit
7fc76451a5
3 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue