Review report

core: PR #35354

🟡 Minor

Deferral can park requests outside the race window (src/net_processing.cpp:3587, head)

This returns true for any known stop block not covered by index_best when the index tip differs from the active tip. It does not check the requested block’s distance from the index best or whether pending validation callbacks can produce the missing filter. Requests for blocks far ahead or on a competing branch can therefore be parked even when no append race is in progress. After a disconnect-only rollback, an indexed stale-branch filter may already be available, yet this predicate still parks the request. ProcessMessages() then stops processing this peer’s later messages until the predicate changes. Restrict deferral to the intended near-tip race cases, or try serving first and defer only a lookup miss that queued index work could plausibly resolve.

Fatal test failures can skip cleanup (src/test/cfilter_race_tests.cpp:354, head)

This installs a global CaptureMessage lambda that captures stack state by reference, but restores the hook only on the normal path. A later BOOST_REQUIRE failure can exit the test without restoring it, leaving subsequent tests with a lambda that refers to destroyed locals. Fatal failures after WaitForEntry() but before Release() can also leave the validation callback blocked and prevent teardown from completing. Use scope guards to restore the capture hook and release the blocker on every exit, preserving the deterministic race assertions while making failure paths safe.

Review coverage was incomplete. The public_contract review had incomplete evidence.