1 suggestion
Optional improvements
[suggestion] · Helper extraction and fixture isolation share one diff
Separating the mining-loop extraction would let reviewers check the relocation independently before reviewing fresh fixtures and removal of the height adjustments; this is a review-flow improvement, not a final-tree defect.
Location: src/test/miner_tests.cpp:127 at 7e81f5046e58 (commit) (commit).
Details and suggested fix
After 838e901e909600f5900f887d322a694debe310fa rewrites transaction construction, 7e81f5046e58a7b59096f7d0dc99055ff02bc27e both extracts the BLOCKINFO loop and converts four shared-chain member functions into independent test cases. The relocation adds substantial diff volume around the change that needs state-sensitive review: replacing the shared chain and its compensating Tip()->nHeight-- adjustments. CONTRIBUTING.md:103-105 also asks that code moves be separated from actual changes.
Split 7e81f5046e58a7b59096f7d0dc99055ff02bc27e into a preparatory extraction commit and an isolation commit, both after 838e901e909600f5900f887d322a694debe310fa. First add COINBASE_OUTPUT_SCRIPT, MinedChain and MineBlockInfoChain(), and have CreateNewBlock_validity obtain txFirst and baseheight from one helper call before the existing LOCK(cs_main). Retain the member-function calls, their script argument and both height decrements. Then convert the four functions into test cases with their own helper calls and remove the decrements. This preserves the final tree while making the mechanical move and the changed fixture state separately reviewable.