When using an assumedvalid chainstate, only process validationinterface
callbacks from the background chainstate within indexes. This ensures
that all indexes are built in-order.
Later, we can possibly designate indexes which can be built out of order
and continue their operation during snapshot use.
Once the background sync has completed, restart the indexes so that
they continue to index the now-validated snapshot chainstate.
This is a partial backport of core#27596
https://github.com/bitcoin/bitcoin/pull/27596/commits/373cf91531b84bfdd06fdf8abf4dca228029ce6b
For now the support for chronik is minimal: the indexer only indexes the IBD chain and ignores the snapshot callbacks, so that everything is indexed in the right order. But when the background chain reaches the snapshot base, indexing will just stop and a node restart will be necessary for it to resume (then the chain are merged and there is no longer a snapshot chain).