aboutsummaryrefslogtreecommitdiff
path: root/src/test/prevector_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-10-18 15:38:44 +0200
committerWladimir J. van der Laan <[email protected]>2016-10-18 15:44:57 +0200
commitcdfb7755a6af2e95e8598ca8e8d6896c745bcd72 (patch)
treefce0cfa5a1d83ef5f9c6f84a6f0875bf1903323f /src/test/prevector_tests.cpp
parentMerge #8935: Documentation: Building on Windows with WSL (diff)
parentKill insecure_random and associated global state (diff)
downloaddiscoin-cdfb7755a6af2e95e8598ca8e8d6896c745bcd72.tar.xz
discoin-cdfb7755a6af2e95e8598ca8e8d6896c745bcd72.zip
Merge #8914: Kill insecure_random and associated global state
5eaaa83 Kill insecure_random and associated global state (Wladimir J. van der Laan)
Diffstat (limited to 'src/test/prevector_tests.cpp')
-rw-r--r--src/test/prevector_tests.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp
index b8c45ca56..6cad02e73 100644
--- a/src/test/prevector_tests.cpp
+++ b/src/test/prevector_tests.cpp
@@ -4,7 +4,7 @@
#include <vector>
#include "prevector.h"
-#include "random.h"
+#include "test_random.h"
#include "serialize.h"
#include "streams.h"
@@ -27,8 +27,7 @@ class prevector_tester {
typedef typename pretype::size_type Size;
bool passed = true;
- uint32_t insecure_rand_Rz_cache;
- uint32_t insecure_rand_Rw_cache;
+ FastRandomContext rand_cache;
template <typename A, typename B>
@@ -171,15 +170,14 @@ public:
test();
}
~prevector_tester() {
- BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: "
- << insecure_rand_Rz_cache
+ BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: "
+ << rand_cache.Rz
<< ", insecure_rand_Rw: "
- << insecure_rand_Rw_cache);
+ << rand_cache.Rw);
}
prevector_tester() {
seed_insecure_rand();
- insecure_rand_Rz_cache = insecure_rand_Rz;
- insecure_rand_Rw_cache = insecure_rand_Rw;
+ rand_cache = insecure_rand_ctx;
}
};