Page MenuHomePhabricator

fix incorrect blk file size calculation during reindex
ClosedPublic

Authored by PiRK on Dec 15 2023, 15:15.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC66d28bb6bb6e: fix incorrect blk file size calculation during reindex
Summary

This fixes a blk file size calculation made during reindex that results in increased blk file malformity.
The fix is to avoid double counting the size of the serialization header during reindex.
This adds a unit test to reproduce the bug before the fix and to ensure that it does not recur.
These changes include a log message change also so as to not be as alarming. This is a common and recoverable
data corruption. These messages can now be filtered by the debug log reindex category.

This is a backport of core#24858

Depends on D14995

Test Plan

ninja all check-all

Diff Detail

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