Page MenuHomePhabricator

refactor: init indexes, decouple 'Start()' from the creation step
ClosedPublic

Authored by PiRK on Tue, Mar 4, 10:08.

Details

Summary

No behavior change.

The goal here is to group indexes, so we can perform the same
initialization and verification process equally for all of them.

The checks performed inside StartIndexes will be expanded
in the subsequent commits.

This is a partial backport of core#27607
https://github.com/bitcoin/bitcoin/pull/27607/commits/225e213110602b4fd1d345167f5f92d26557f6c1
Depends on D17745

Note that we need to return false if StartIndexes fails or else tests will fail because the node will not abort on failure to start an index. This code divergence from Core goes away in the next commit.

Test Plan

ninja all check check-functional-extended

Event Timeline

PiRK requested review of this revision.Tue, Mar 4, 10:08
PiRK added inline comments.
src/init.cpp
2679

this return is missing in the source material which breaks the tests until next commit fixes it

This revision is now accepted and ready to land.Tue, Mar 4, 14:21