Review report

bitcoin/bitcoin: PR #36192

1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Unsatisfiable-timestamp coverage misses retarget-period boundaries

The new case exercises only a mid-period template, so it does not test the advertised timestamp conflict at the timewarp and Murch-Zawy boundaries.

Location: test/functional/interface_ipc_mining.py:789 (head).

Details and suggested fix

run_unsatisfiable_timestamp_test runs once at the height inherited from earlier subtests, without positioning or asserting the attempted template's period offset. Both failure checks and one-second recovery use the same tip. Consequently, neither special branch of GetMinimumTime, at offsets 0 and 143, executes while MTP+1 exceeds the future-time limit. The separate mining_basic.py boundary scenarios make the additional bound dominate MTP+1 instead. Current production behavior is correct because both branches use std::max, but this case does not check that they preserve a larger MTP+1. Add explicitly positioned conflict cases for the advertised offsets 142, 143 and 0, and assert (victim.getblockcount() + 1) % DIFFICULTY_ADJUSTMENT_INTERVAL before checking failure and recovery.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.