bitcoin/src/rpc
MarcoFalke a063647413
Merge bitcoin/bitcoin#23280: init: Coalesce Chainstate loading sequence between {,non-}unittest codepaths
7f15eff2dd style-only: Remove redundant scope in *Chainstate (Carl Dong)
89bec827fd Collapse the 2 cs_main locks in LoadChainstate (Carl Dong)
3b1584b794 Remove all #include // for * comments (Carl Dong)
9a5a5a3d08 test/setup: Use LoadChainstate (Carl Dong)
c541da0d62 node/chainstate: Add options for in-memory DBs (Carl Dong)
ceb9790341 node/caches: Remove intermediate variables (Carl Dong)
ac4bf138b8 node/caches: Extract cache calculation logic (Carl Dong)
15f2e33bb3 validation: VerifyDB only needs Consensus::Params (Carl Dong)
4da9c076d1 node/chainstate: Decouple from ShutdownRequested (Carl Dong)
05441c2dc5 node/chainstate: Decouple from GetTime (Carl Dong)
2414ebc18b init: Delay RPC block notif until warmup finished (Carl Dong)
8d466a8504 Move -checkblocks LogPrintf to AppInitMain (Carl Dong)
aad8d59789 node/chainstate: Reduce coupling of LogPrintf (Carl Dong)
b345979a2b node/chainstate: Decouple from concept of uiInterface (Carl Dong)
ca7c0b934d Split off VerifyLoadedChainstate (Carl Dong)
adf4912d77 node/chainstate: Remove do/while loop (Carl Dong)
975235ca0a Move init logistics message for BAD_GENESIS_BLOCK to init.cpp (Carl Dong)
8715658983 Move mempool nullptr Assert out of LoadChainstate (Carl Dong)
9162a4f93e node/chainstate: Decouple from concept of NodeContext (Carl Dong)
c7a5c46e6f node/chainstate: Decouple from ArgsManager (Carl Dong)
ae9121f958 node/chainstate: Decouple from stringy errors (Carl Dong)
cbac28b72f node/chainstate: Decouple from GetTimeMillis (Carl Dong)
cb64af9635 node: 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 ACK 7f15eff2dd. Thanks for updates!
  MarcoFalke:
    review ACK 7f15eff2dd 💳

Tree-SHA512: fb9a6cbd1c511a52b477c62a5e68e53a8be5dec2fff0e44a279966afb91efbab44bf1fe7c6b1519f8464ecc25f42dd4bae8e1efbf55ee91fc90fa0b92e3a83e2
2021-12-10 17:17:43 +01:00
..
blockchain.cpp Merge bitcoin/bitcoin#23280: init: Coalesce Chainstate loading sequence between {,non-}unittest codepaths 2021-12-10 17:17:43 +01:00
blockchain.h Merge bitcoin/bitcoin#20295: rpc: getblockfrompeer 2021-12-08 10:39:37 +01:00
client.cpp Merge bitcoin/bitcoin#20295: rpc: getblockfrompeer 2021-12-08 10:39:37 +01:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
external_signer.cpp doc: Fix RPC result documentation 2021-09-21 11:13:29 +02:00
mining.cpp scripted-diff: Use named args in RPC docs 2021-12-08 11:54:12 +01:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp Merge bitcoin/bitcoin#23703: scripted-diff: Use named args in RPC docs 2021-12-09 17:14:26 +08:00
net.cpp Merge bitcoin/bitcoin#19499: p2p: Make timeout mockable and type safe, speed up test 2021-12-10 10:02:12 +01:00
protocol.h rpc: Add specific error code for "wallet already loaded" 2021-01-25 07:55:35 +01:00
rawtransaction.cpp Merge bitcoin/bitcoin#22514: psbt: Actually use SIGHASH_DEFAULT for PSBT signing 2021-12-10 10:17:36 +01:00
rawtransaction_util.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
rawtransaction_util.h Change SignTransaction's input_errors to use bilingual_str 2021-07-01 12:57:53 -04:00
register.h Move external signer out of wallet module 2021-04-08 17:56:00 +02:00
request.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
request.h Drop JSONRPCRequest constructors after #21366 2021-04-07 04:53:26 -04:00
server.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
server.h [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
server_util.cpp rpc: move Ensure* helpers to server_util.h 2021-12-02 13:15:32 +07:00
server_util.h rpc: move Ensure* helpers to server_util.h 2021-12-02 13:15:32 +07:00
util.cpp doc: Normalize RPC description whitespace 2021-12-08 19:43:24 +01:00
util.h refactor: Remove useless extern keyword 2021-05-10 09:09:24 +02:00