HomePhabricator

init: Stop indexes on shutdown after ChainStateFlushed callback.

Description

init: Stop indexes on shutdown after ChainStateFlushed callback.

Summary:

Currently, the latest index state may not be committed to disk on shutdown.
The state is committed on ChainStateFlushed callbacks and the current init order unregisters the indexes as validation interfaces before the final ChainStateFlushed callback is called on them.
This was causing the txindexing progress to have fallen behind to its last random checkpoint the next time bitcoind was started.

This is a backport of Core PR17897

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
jimpoAuthored on Jan 8 2020, 20:07
PiRKCommitted on Dec 14 2020, 14:02
PiRKPushed on Dec 14 2020, 14:02
Reviewer
Restricted Project
Differential Revision
D8663: init: Stop indexes on shutdown after ChainStateFlushed callback.
Parents
rABC3a831f23ae28: gui: Delay interfaces::Node initialization
Branches
Unknown
Tags
Unknown