Page MenuHomePhabricator

index: Don't commit a best block before indexing it during sync
ClosedPublic

Authored by PiRK on Wed, Feb 26, 15:30.

Details

Summary

Committing a block prior to indexing would leave the index database
in an inconsistent state until it is indexed, which could corrupt the
index in case of a unclean shutdown. Thus commit its predecessor.

Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
This is a backport of core#25074

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable