refactor: index, decouple 'Init' from 'Start'

So indexes can be initialized without spawning
the sync thread.

This makes asynchronous indexes startup
possible in the following commits.
This commit is contained in:
furszy
2023-05-17 00:55:09 -03:00
parent 225e213110
commit 430e7027a1
7 changed files with 35 additions and 23 deletions

View File

@@ -74,6 +74,6 @@ bool AppInitMain(node::NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip
void SetupServerArgs(ArgsManager& argsman);
/** Validates requirements to run the indexes and spawns each index initial sync thread */
bool StartIndexes(node::NodeContext& node);
bool StartIndexBackgroundSync(node::NodeContext& node);
#endif // BITCOIN_INIT_H