diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-24 14:02:12 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-24 14:28:49 +0200 |
commit | 342b9bc3907edf8eae64440397a32833ed44fae4 (patch) | |
tree | f9b070090a7f34ce82a703a0e3d5509dc882f60d /src/test/prevector_tests.cpp | |
parent | 1b25b6df0f08f7474228c5b6ed13b58682e1e440 (diff) | |
parent | 4fd2d2fc97e21efceab849576e544160fd5e3e3d (diff) | |
download | bitcoin-342b9bc3907edf8eae64440397a32833ed44fae4.tar.xz |
Merge #9792: FastRandomContext improvements and switch to ChaCha20
4fd2d2f Add a FastRandomContext::randrange and use it (Pieter Wuille)
1632922 Switch FastRandomContext to ChaCha20 (Pieter Wuille)
e04326f Add ChaCha20 (Pieter Wuille)
663fbae FastRandom benchmark (Pieter Wuille)
c21cbe6 Introduce FastRandomContext::randbool() (Pieter Wuille)
Tree-SHA512: 7fff61e3f6d6dc6ac846ca643d877b377db609646dd401a0e8f50b052c6b9bcd2f5fc34de6bbf28f04afd1724f6279ee163ead5f37d724fb782a00239f35db1d
Diffstat (limited to 'src/test/prevector_tests.cpp')
-rw-r--r-- | src/test/prevector_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index bd8a7819a4..cfed5e347e 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -28,6 +28,7 @@ class prevector_tester { typedef typename pretype::size_type Size; bool passed = true; FastRandomContext rand_cache; + uint256 rand_seed; template <typename A, typename B> @@ -183,13 +184,12 @@ public: } ~prevector_tester() { - BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: " - << rand_cache.Rz - << ", insecure_rand_Rw: " - << rand_cache.Rw); + BOOST_CHECK_MESSAGE(passed, "insecure_rand: " + rand_seed.ToString()); } + prevector_tester() { seed_insecure_rand(); + rand_seed = insecure_rand_seed; rand_cache = insecure_rand_ctx; } }; |