0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/test/util
fanquake 52c6904c78
Merge bitcoin/bitcoin#28558: Make PeerManager own a FastRandomContext
4cafe9f176 [test] Make PeerManager's rng deterministic in tests (dergoegge)
fecec3e1c6 [net processing] FeeFilterRounder doesn't own a FastRandomContext (dergoegge)
47520ed209 [net processing] Make fee filter rounder non-global (dergoegge)
77506f4ac6 [net processing] Addr shuffle uses PeerManager's rng (dergoegge)
a648dd79e5 [net processing] PushAddress uses PeerManager's rng (dergoegge)
87c706713e [net processing] PeerManager holds a FastRandomContext (dergoegge)

Pull request description:

  This lets us avoid some non-determinism in tests (also see #28537).

ACKs for top commit:
  MarcoFalke:
    re-ACK 4cafe9f176  🕗
  glozow:
    concept && light code review ACK 4cafe9f176

Tree-SHA512: 3c18700773d0bc547ccb6442c41567e6f26b0b50fab5b79620da417ec91b9c0ae1395d15258da3aa4a91447b8ce560145dd135e39fbbd0610749e528e665b111
2023-10-05 14:06:39 +01:00
..
blockfilter.cpp Remove unused includes from blockfilter.h 2023-08-17 18:28:15 +02:00
blockfilter.h refactor: Move functions to BlockManager methods 2023-05-10 19:06:53 +02:00
chainstate.h validation: do not activate snapshot if behind active chain 2023-09-30 06:41:21 -04:00
coins.cpp De-duplicate add_coin methods to a test util helper 2023-02-09 15:03:36 -08:00
coins.h De-duplicate add_coin methods to a test util helper 2023-02-09 15:03:36 -08:00
index.cpp test: indexes, fix on error infinite loop 2023-07-10 15:27:13 -03:00
index.h test: Restore unlimited timeout in IndexWaitSynced 2023-07-06 14:19:59 +02:00
json.cpp test, build: Separate read_json function into its own module 2023-01-27 09:26:29 +00:00
json.h test, build: Separate read_json function into its own module 2023-01-27 09:26:29 +00:00
logging.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
logging.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
mining.cpp Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
mining.h test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
net.cpp scripted-diff: use SER_PARAMS_OPFUNC 2023-09-14 10:25:26 +10:00
net.h Merge bitcoin/bitcoin#26312: Remove Sock::Get() and Sock::Sock() 2023-10-03 09:57:46 -04:00
poolresourcetester.h Add pool based memory resource & allocator 2023-03-23 19:38:38 +01:00
random.cpp test: move remaining random test util code from setup_common to random 2023-06-14 08:28:33 -06:00
random.h test: move remaining random test util code from setup_common to random 2023-06-14 08:28:33 -06:00
README.md
script.cpp fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target 2021-03-30 10:42:45 +02:00
script.h fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target 2021-03-30 10:42:45 +02:00
setup_common.cpp [test] Make PeerManager's rng deterministic in tests 2023-10-04 13:16:53 +01:00
setup_common.h test: move random.h include header from setup_common.h to cpp 2023-06-14 08:28:33 -06:00
str.cpp
str.h
transaction_utils.cpp
transaction_utils.h
txmempool.cpp mempool_entry: add mempool entry sequence number 2023-08-03 13:42:45 +10:00
txmempool.h mempool_entry: add mempool entry sequence number 2023-08-03 13:42:45 +10:00
validation.cpp validation: pass ChainstateRole for validationinterface calls 2023-09-30 06:38:47 -04:00
validation.h validation: pass ChainstateRole for validationinterface calls 2023-09-30 06:38:47 -04:00
xoroshiro128plusplus.h Add xoroshiro128++ PRNG 2023-01-30 18:12:21 -05:00

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).