HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17746

Details

Provenance
furszy <matiasfurszyfer@protonmail.com>Authored on Jun 16 2023, 13:16
PiRKCommitted on Tue, Mar 4, 14:37
PiRKPushed on Tue, Mar 4, 14:37
Reviewer
Restricted Project
Differential Revision
D17746: refactor: init indexes, decouple 'Start()' from the creation step
Parents
rABC648994976d40: rename 'loadblk' thread name to 'initload'
Branches
Unknown
Tags
Unknown