@@ -78,13 +78,6 @@ class BaseIndex : public CValidationInterface
7878 std::thread m_thread_sync;
7979 CThreadInterrupt m_interrupt;
8080
81- // / Sync the index with the block index starting from the current best block.
82- // / Intended to be run in its own thread, m_thread_sync, and can be
83- // / interrupted with m_interrupt. Once the index gets in sync, the m_synced
84- // / flag is set and the BlockConnected ValidationInterface callback takes
85- // / over and the sync thread exits.
86- void ThreadSync ();
87-
8881 // / Write the current index state (eg. chain block locator and subclass-specific items) to disk.
8982 // /
9083 // / Recommendations for error handling:
@@ -152,9 +145,16 @@ class BaseIndex : public CValidationInterface
152145 // / validation interface so that it stays in sync with blockchain updates.
153146 [[nodiscard]] bool Init ();
154147
155- // / Starts the initial sync process.
148+ // / Starts the initial sync process on a background thread .
156149 [[nodiscard]] bool StartBackgroundSync ();
157150
151+ // / Sync the index with the block index starting from the current best block.
152+ // / Intended to be run in its own thread, m_thread_sync, and can be
153+ // / interrupted with m_interrupt. Once the index gets in sync, the m_synced
154+ // / flag is set and the BlockConnected ValidationInterface callback takes
155+ // / over and the sync thread exits.
156+ void Sync ();
157+
158158 // / Stops the instance from staying in sync with blockchain updates.
159159 void Stop ();
160160
0 commit comments