diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-10-18 15:38:44 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-10-18 15:44:57 +0200 |
| commit | cdfb7755a6af2e95e8598ca8e8d6896c745bcd72 (patch) | |
| tree | fce0cfa5a1d83ef5f9c6f84a6f0875bf1903323f /src/test/prevector_tests.cpp | |
| parent | Merge #8935: Documentation: Building on Windows with WSL (diff) | |
| parent | Kill insecure_random and associated global state (diff) | |
| download | discoin-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.cpp | 14 |
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; } }; |