Skip to content

Commit fa61202

Browse files
author
MarcoFalke
committed
test: Add comment to g_insecure_rand_ctx
1 parent fa0d3c4 commit fa61202

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/test_bitcoin.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::os
2626
return stream << static_cast<typename std::underlying_type<T>::type>(e);
2727
}
2828

29+
/**
30+
* This global and the helpers that use it are not thread-safe.
31+
*
32+
* If thread-safety is needed, the global could be made thread_local (given
33+
* that thread_local is supported on all architectures we support) or a
34+
* per-thread instance could be used in the multi-threaded test.
35+
*/
2936
extern FastRandomContext g_insecure_rand_ctx;
3037

3138
static inline void SeedInsecureRand(bool deterministic = false)

0 commit comments

Comments
 (0)