mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
The global g_insecure_rand_ctx will be removed in the future, so removing it from this helper is useful. Also, tying the two concepts of the global internal RNGState and the global test-only rng context is a bit confusing, because tests can simply use the m_rng, if it exists. Also, tests may seed more than one random context, or none at all, or a random context of a different type. Fix all issues by moving the Reseed call to the two places where it is used. |
||
|---|---|---|
| .. | ||
| blockfilter.cpp | ||
| blockfilter.h | ||
| chainstate.h | ||
| cluster_linearize.h | ||
| coins.cpp | ||
| coins.h | ||
| index.cpp | ||
| index.h | ||
| json.cpp | ||
| json.h | ||
| logging.cpp | ||
| logging.h | ||
| mining.cpp | ||
| mining.h | ||
| net.cpp | ||
| net.h | ||
| poolresourcetester.h | ||
| random.cpp | ||
| random.h | ||
| README.md | ||
| script.cpp | ||
| script.h | ||
| setup_common.cpp | ||
| setup_common.h | ||
| str.cpp | ||
| str.h | ||
| transaction_utils.cpp | ||
| transaction_utils.h | ||
| txmempool.cpp | ||
| txmempool.h | ||
| validation.cpp | ||
| validation.h | ||
Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the BasicTestingSetup (or one of its derived classes).