This PR:
- Coalesce the Chainstate loading sequence between
AppInitMain
and*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::LoadChainstateSequence
function - Makes this
::LoadChainstateSequence
function reusable by- Decoupling it from various concepts (
ArgsManager
,uiInterface
, etc) - Making it report errors using an
enum
rather than by setting abilingual_str
- Decoupling it from various concepts (
- 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!