mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
use crypto::rand instead of libc rand in a few tests
We don't need secure randomness here, but it should shut coverity up
This commit is contained in:
parent
c0bc6d96cd
commit
de27651f80
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