This PR:
- Coalesce the Chainstate loading sequence between
AppInitMainand*TestingSetup(which makes it more tested) - Makes the Chainstate loading sequence reusable in preparation for future work extracting out our consensus engine.
Code-wise, this PR:
- Extracts
AppInitMain’s Chainstate loading sequence into a::LoadChainstateSequencefunction - Makes this
::LoadChainstateSequencefunction reusable by- Decoupling it from various concepts (
ArgsManager,uiInterface, etc) - Making it report errors using an
enumrather than by setting abilingual_str
- Decoupling it from various concepts (
- Makes
*TestingSetupuse 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!

