1 suggestion
Optional improvements
[suggestion] · The boundary relaxation in 4b3849d is bundled with snapshot guarding
Although the final guard is correct, 4b3849d couples a rollback-boundary relaxation affecting ordinary pruned nodes with unpruned-snapshot guarding and test rewrites that can be reviewed independently.
Location: src/rpc/blockchain.cpp:3179 at 4b3849d53b17 (commit) (commit).
Details and suggested fix
a2996510e84cfb1b0dee64e6c1ef179d30fd6532 supplies the crash reproducer, and 8c81459873943d8aaeb163d564cdf2501cd4432f fixes the pruned-node assertion. Its direct child, 4b3849d53b17f20ade22ce3feaa5b5dc9c8d21b0, bundles the snapshot-guard extension, prune-lock adjustment, error wording and helper rewrites with the change from >= to >. That last change independently allows an ordinary pruned node whose first retained block is h to roll back to h - 1, because rollback does not disconnect the target block.
Move the snapshot-guard/prune-lock changes, error wording, helper refactor and n2 check into 8c81459, leaving 4b3849d with the boundary relaxation and rollback_to_base.dat test. The below-base rejection tests still work with >=; only the successful rollback-to-base test needs >. This avoids another round of assertion edits and isolates the range change with its distinguishing test. If 8c81459 should remain minimal for backporting, put the snapshot-extension changes in a separate commit before the relaxation instead. For the new n2 missing-tip-data case, the intermediate code already returns Failed to read block after copying the UTXO set rather than crashing; this is a review-flow suggestion, not a head defect.