mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
7f15eff2ddstyle-only: Remove redundant scope in *Chainstate (Carl Dong)89bec827fdCollapse the 2 cs_main locks in LoadChainstate (Carl Dong)3b1584b794Remove all #include // for * comments (Carl Dong)9a5a5a3d08test/setup: Use LoadChainstate (Carl Dong)c541da0d62node/chainstate: Add options for in-memory DBs (Carl Dong)ceb9790341node/caches: Remove intermediate variables (Carl Dong)ac4bf138b8node/caches: Extract cache calculation logic (Carl Dong)15f2e33bb3validation: VerifyDB only needs Consensus::Params (Carl Dong)4da9c076d1node/chainstate: Decouple from ShutdownRequested (Carl Dong)05441c2dc5node/chainstate: Decouple from GetTime (Carl Dong)2414ebc18binit: Delay RPC block notif until warmup finished (Carl Dong)8d466a8504Move -checkblocks LogPrintf to AppInitMain (Carl Dong)aad8d59789node/chainstate: Reduce coupling of LogPrintf (Carl Dong)b345979a2bnode/chainstate: Decouple from concept of uiInterface (Carl Dong)ca7c0b934dSplit off VerifyLoadedChainstate (Carl Dong)adf4912d77node/chainstate: Remove do/while loop (Carl Dong)975235ca0aMove init logistics message for BAD_GENESIS_BLOCK to init.cpp (Carl Dong)8715658983Move mempool nullptr Assert out of LoadChainstate (Carl Dong)9162a4f93enode/chainstate: Decouple from concept of NodeContext (Carl Dong)c7a5c46e6fnode/chainstate: Decouple from ArgsManager (Carl Dong)ae9121f958node/chainstate: Decouple from stringy errors (Carl Dong)cbac28b72fnode/chainstate: Decouple from GetTimeMillis (Carl Dong)cb64af9635node: Extract chainstate loading sequence (Carl Dong) Pull request description: This PR: 1. Coalesce the Chainstate loading sequence between `AppInitMain` and `*TestingSetup` (which makes it more tested) 2. Makes the Chainstate loading sequence reusable in preparation for future work extracting out our consensus engine. Code-wise, this PR: 1. Extracts `AppInitMain`'s Chainstate loading sequence into a `::LoadChainstateSequence` function 2. Makes this `::LoadChainstateSequence` function reusable by 1. Decoupling it from various concepts (`ArgsManager`, `uiInterface`, etc) 2. Making it report errors using an `enum` rather than by setting a `bilingual_str` 3. Makes `*TestingSetup` use this new `::LoadChainstateSequence` Reviewers: Aside from commentary, I've also included `git diff` flags of interest in the commit messages which I hope will aid review! ACKs for top commit: ryanofsky: Code review ACK7f15eff2dd. Thanks for updates! MarcoFalke: review ACK7f15eff2dd💳 Tree-SHA512: fb9a6cbd1c511a52b477c62a5e68e53a8be5dec2fff0e44a279966afb91efbab44bf1fe7c6b1519f8464ecc25f42dd4bae8e1efbf55ee91fc90fa0b92e3a83e2
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).