Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin.h
Show All 28 Lines | static inline void SeedInsecureRand(bool fDeterministic = false) { | ||||
if (fDeterministic) { | if (fDeterministic) { | ||||
insecure_rand_seed = uint256(); | insecure_rand_seed = uint256(); | ||||
} else { | } else { | ||||
insecure_rand_seed = GetRandHash(); | insecure_rand_seed = GetRandHash(); | ||||
} | } | ||||
insecure_rand_ctx = FastRandomContext(insecure_rand_seed); | insecure_rand_ctx = FastRandomContext(insecure_rand_seed); | ||||
} | } | ||||
static inline uint32_t insecure_rand() { | static inline uint32_t InsecureRand32() { | ||||
return insecure_rand_ctx.rand32(); | return insecure_rand_ctx.rand32(); | ||||
} | } | ||||
static inline uint256 InsecureRand256() { | static inline uint256 InsecureRand256() { | ||||
return insecure_rand_ctx.rand256(); | return insecure_rand_ctx.rand256(); | ||||
} | } | ||||
static inline uint64_t InsecureRandBits(int bits) { | static inline uint64_t InsecureRandBits(int bits) { | ||||
return insecure_rand_ctx.randbits(bits); | return insecure_rand_ctx.randbits(bits); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |