1 suggestion
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Optional improvements
[suggestion] · Out-of-range file numbers write past the pruning bitmap
An invalid file number now causes undefined behavior rather than a checked exception, although no current caller supplies one.
Location: src/node/blockstorage.cpp:280 (head).
Details and suggested fix
PruneBlockFiles sizes prune_file to MaxBlockfileNum() + 1, then writes prune_file[fileNumber] for each selected file without checking the range. A negative number or one greater than MaxBlockfileNum() causes an out-of-bounds std::vector<bool> write and undefined behavior. Previously, PruneOneBlockFile used the number in a comparison and m_blockfile_info.at(fileNumber), so the same input threw std::out_of_range. The .at() call remains, but it runs after the unchecked write and after block-index entries for other selected files have changed. Current callers generate file numbers within the valid range, so no current caller triggers this; the concern is limited to future callers of this public method. Use prune_file.at(fileNumber) = true to restore a checked failure before changing block-index or file-info state.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Assert that batch pruning clears undo metadata