Page MenuHomePhabricator

index: Commit DB_MUHASH and DB_BEST_BLOCK to disk together
ClosedPublic

Authored by PiRK on May 17 2023, 16:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9f3a925b490d: index: Commit DB_MUHASH and DB_BEST_BLOCK to disk together
Summary

If these are written to disk at different times unclean shutdowns can lead to index corruption.

Add coinstatsindex_unclean_shutdown test

This is a backport of core#24138
Depends on D13912

Notes:

  • since D2127 removed the block index as an output parameter of AcceptBlock, we need some additional code in the test to fetch it from the block index.
  • src/test/util/validation.{h|cpp} need to be created since we didn't yet backport core#20332
Test Plan

ninja all check-all

Diff Detail

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