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
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.