1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 #ifndef BITCOIN_TEST_RANDOM_H
7 #define BITCOIN_TEST_RANDOM_H
11 extern FastRandomContext insecure_rand_ctx
;
13 static inline void seed_insecure_rand(bool fDeterministic
= false)
15 insecure_rand_ctx
= FastRandomContext(fDeterministic
);
18 static inline uint32_t insecure_rand(void)
20 return insecure_rand_ctx
.rand32();