aboutsummaryrefslogtreecommitdiff
path: root/src/test/cuckoocache_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-09-26 09:14:19 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-10-09 11:20:12 -0400
commitfae43a97ca947cd0802392e9bb86d9d0572c0fba (patch)
treeef72f69f145352b6c0a0a03cc5401711321e1e1b /src/test/cuckoocache_tests.cpp
parentab765c2ec7db042142298cdd6ca9c2f04cca8598 (diff)
test: Seed test RNG context for each test case, print seed
Diffstat (limited to 'src/test/cuckoocache_tests.cpp')
-rw-r--r--src/test/cuckoocache_tests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp
index d38ede691a..abae05a190 100644
--- a/src/test/cuckoocache_tests.cpp
+++ b/src/test/cuckoocache_tests.cpp
@@ -29,7 +29,7 @@ BOOST_AUTO_TEST_SUITE(cuckoocache_tests);
*/
BOOST_AUTO_TEST_CASE(test_cuckoocache_no_fakes)
{
- SeedInsecureRand(true);
+ SeedInsecureRand(SeedRand::ZEROS);
CuckooCache::cache<uint256, SignatureCacheHasher> cc{};
size_t megabytes = 4;
cc.setup_bytes(megabytes << 20);
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(test_cuckoocache_no_fakes)
template <typename Cache>
static double test_cache(size_t megabytes, double load)
{
- SeedInsecureRand(true);
+ SeedInsecureRand(SeedRand::ZEROS);
std::vector<uint256> hashes;
Cache set{};
size_t bytes = megabytes * (1 << 20);
@@ -118,7 +118,7 @@ template <typename Cache>
static void test_cache_erase(size_t megabytes)
{
double load = 1;
- SeedInsecureRand(true);
+ SeedInsecureRand(SeedRand::ZEROS);
std::vector<uint256> hashes;
Cache set{};
size_t bytes = megabytes * (1 << 20);
@@ -181,7 +181,7 @@ template <typename Cache>
static void test_cache_erase_parallel(size_t megabytes)
{
double load = 1;
- SeedInsecureRand(true);
+ SeedInsecureRand(SeedRand::ZEROS);
std::vector<uint256> hashes;
Cache set{};
size_t bytes = megabytes * (1 << 20);
@@ -285,7 +285,7 @@ static void test_cache_generations()
// iterations with non-deterministic values, so it isn't "overfit" to the
// specific entropy in FastRandomContext(true) and implementation of the
// cache.
- SeedInsecureRand(true);
+ SeedInsecureRand(SeedRand::ZEROS);
// block_activity models a chunk of network activity. n_insert elements are
// added to the cache. The first and last n/4 are stored for removal later