aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-02-04 12:11:34 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-02-04 12:26:42 +0100
commit424327e1a8f5ccc0ebd9265c50725d37093d5164 (patch)
tree18359ab386826a982e7898514392456b59c16619 /src/test/test_bitcoin.h
parent64127b3098a1aab70200b6d07194dce072ad5cf2 (diff)
parentfae169c95e09ddf068dcaebc8170c4f41b02cf66 (diff)
Merge #15324: test: Make bloom tests deterministic
fae169c95e09ddf068dcaebc8170c4f41b02cf66 test: Make bloom tests deterministic (MarcoFalke) Pull request description: non-deterministic tests are useless, since a failing test could not be reproduced unless the seed is known. Tree-SHA512: 4f634ff0c6adf663444f1ac504f6dbceaa46b78d697b840531977ba30006453ac559d5c21cc3eaef6d92b87d46008a34b0db6331ea3318001987fcfaec634acf
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r--src/test/test_bitcoin.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index 71520232ac..4a06845683 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -35,6 +35,11 @@ std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::os
*/
extern FastRandomContext g_insecure_rand_ctx;
+/**
+ * Flag to make GetRand in random.h return the same number
+ */
+extern bool g_mock_deterministic_tests;
+
static inline void SeedInsecureRand(bool deterministic = false)
{
g_insecure_rand_ctx = FastRandomContext(deterministic);