PR description:
When an index thread receives an interrupt during init before it got to index anything (so m_best_block_index == nullptr still), it will still try to commit previous "work" before stopping the thread. That means that BaseIndex::CommitInternal() calls GetLocator(nullptr), which returns an locator to the tip (code), and saves it to the index DB.
On the next startup, this locator will be read and it will be assumed that we have successfully synced the index to the tip, when in reality we have indexed nothing.
In the case of coinstatsindex, this would lead to a shutdown of bitcoind without any indication what went wrong. For the other indexes, there would be no immediate shutdown, but the index would be corrupt.This PR fixes this by not committing when m_best_block_index==nullptr, and it also adds an error log message to the silent coinstatsindex shutdown path.
This is another small bug found by feature_init.py - the second commit enables blockfilterindex and coinstatsindex for this test, enabling coinstatsindex without the first commit would have led to frequent failures.
commits:
index: Don't commit without valid m_best_block_index
Also report an error when coinstatsindex init fails.
test: activate all index types in feature_init.py
This is a backport of core#24117
Depends on D12621