WIP: iwyu: Fix warnings in src/test/fuzz and treat them as errors

bitcoin/bitcoin: PR #36808

1 suggestion

Optional improvements

Link

[suggestion] · The fuzz commit leaves shared-header refactoring unexplained

9353e13 combines roughly 30 shared-header edits and a valid bitdeque declaration cleanup with the fuzz include fixes, but its fuzz-focused title and empty body do not identify the broader review scope.

Location: src/txrequest.h:8 (head).

Details and suggested fix

Commit 9353e132655f74859e2719a96322dd404a045abe changes dependencies outside fuzz: txrequest.h replaces <net.h> with <net_types.h>, and block_policy_estimator.h replaces its <random.h> dependency with a forward declaration, requiring the explicit include in test/feerounder_tests.cpp. These shared-header changes warrant checking non-fuzz consumers separately from the mechanical fuzz edits. Move them, the bitdeque cleanup, and every consumer fix they require, including affected fuzz files, into a preparatory commit. This follows the dependency-and-consumer grouping used by cc39f15ceb5d7238e79b0a3045f7e687ce873a17 for the chain, headerssync, key_io, merkleblock and pow modules. The remaining fuzz cleanup and enforcement can then be reviewed separately without changing the final tree.

At minimum, add a body to 9353e132655f74859e2719a96322dd404a045abe describing the shared-header scope and explaining why the removed bitdeque declarations were redundant. Nested classes already have access to the enclosing class; the retained friend class bitdeque; also lets its nested iterator members access iterator internals, preserving the non-const-to-const conversion. This is a review-flow concern, not a claim that the removal breaks compilation. The private_broadcast.h pragmas already explain their workaround.


Coverage details