0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-05 10:17:30 -05:00
bitcoin-bitcoin-core/src/test/util
fanquake 9564f98fee
Merge bitcoin/bitcoin#27636: kernel: Remove util/system from kernel library, interface_ui from validation.
7d3b35004b refactor: Move system from util to common library (TheCharlatan)
7eee356c0a refactor: Split util::AnyPtr into its own file (TheCharlatan)
44de325d95 refactor: Split util::insert into its own file (TheCharlatan)
9ec5da36b6 refactor: Move ScheduleBatchPriority to its own file (TheCharlatan)
f871c69191 kernel: Add warning method to notifications (TheCharlatan)
4452707ede kernel: Add progress method to notifications (TheCharlatan)
84d71457e7 kernel: Add headerTip method to notifications (TheCharlatan)
447761c822 kernel: Add notification interface (TheCharlatan)

Pull request description:

  This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/27587 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel".

  ---

  It removes the kernel library's dependency on `util/system` and `interface_ui`. `util/system` contains networking and shell-related code that should not be part of the kernel library. The following pull requests prepared `util/system` for this final step: https://github.com/bitcoin/bitcoin/pull/27419 https://github.com/bitcoin/bitcoin/pull/27254 https://github.com/bitcoin/bitcoin/pull/27238.

  `interface_ui` defines functions for a more general node interface and has a dependency on `boost/signals2`. After applying the patches from this pull request, the kernel's reliance on boost is down to `boost::multiindex`.

  The approach implemented here introduces some indirection, which makes the code a bit harder to read. Any suggestions for improving or reworking this pull request to make it more concise, or even reworking it into a more proper interface, are appreciated.

ACKs for top commit:
  MarcoFalke:
    re-ACK 7d3b35004b (no change) 🎋
  stickies-v:
    Code Review ACK 7d3b35004b
  hebasto:
    re-ACK 7d3b35004b, only last two commits dropped since my [recent](https://github.com/bitcoin/bitcoin/pull/27636#pullrequestreview-1435394620) review.

Tree-SHA512: c8cfc698dc9d78e20191c444708f2d957501229abe95e5806106d1126fb9c5fbcee686fb55645658c0107ce71f10646f37a2fdf7fde16bbf22cbf1ac885dd08d
2023-05-30 14:57:22 +01:00
..
blockfilter.cpp refactor: Move functions to BlockManager methods 2023-05-10 19:06:53 +02:00
blockfilter.h refactor: Move functions to BlockManager methods 2023-05-10 19:06:53 +02:00
chainstate.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01: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
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 test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
mining.h test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
net.cpp Merge bitcoin/bitcoin#27324: net: #27257 follow-ups 2023-03-28 11:48:02 +01:00
net.h clang-tidy: Fix modernize-use-default-member-init in headers 2023-01-31 11:50:10 +00:00
poolresourcetester.h Add pool based memory resource & allocator 2023-03-23 19:38:38 +01:00
random.h Create InsecureRandMoneyAmount() test util helper 2023-02-09 15:03:36 -08:00
README.md doc: Add documentation for new test/lib 2019-11-06 11:56:53 -05:00
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 refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
setup_common.h fuzz: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting 2023-05-26 17:14:23 +02:00
str.cpp
str.h [test] move string helper functions into test library 2019-11-25 01:33:17 +01:00
transaction_utils.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
transaction_utils.h scripted-diff: TxoutType C++11 scoped enum class 2020-06-21 06:41:55 -04:00
txmempool.cpp refactor: Replace std::optional<bilingual_str> with util::Result 2023-05-24 08:55:47 -04:00
txmempool.h test: Use type-safe NodeSeconds for TestMemPoolEntryHelper 2022-10-24 11:33:33 +02:00
validation.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
validation.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00: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).