2 suggestions
Optional improvements
[suggestion] · Redundant chain mining remains in CreateNewBlock_validity
After the split, CreateNewBlock_validity still mines the 110-block chain without consuming it, while all four extracted cases already execute the same assertion-bearing helper.
Location: src/test/miner_tests.cpp:981 (head).
Details and suggested fix
The final MineBlockInfoChain(*mining) discards txFirst and baseheight, and nothing follows it. Previously, the mined chain supplied inputs to the subtests. Each extracted case now mines its own chain, also exercising the helper's submission, duplicate-rejection, deprecated-method and tip-update assertions. Remove the trailing invocation unless this case needs an independent mining check, in which case document that purpose. The PR describes per-case mining as cheap, so the benefit is removing redundant setup rather than a demonstrated runtime improvement.
[suggestion] · basic_mining still inherits parent IDs and entry metadata between sections
Although behavior matches base, the declarative transactions still depend on a repeatedly overwritten hash and persistent entry-helper settings, leaving some test inputs implicit.
Location: src/test/miner_tests.cpp:595 (head).
Details and suggested fix
The orphan transaction reads hash from the preceding 63-transaction loop and repeats its count in the output value, even though MakeMempool() has removed that parent. The mempool-dependent sequence-lock checks similarly read the absolute-time-locked parent's ID through hash; that dependency is intentional because the parent must remain in the same mempool. Separately, entry.Time(...).FromTx(tx) in three locktime sections inherits Fee(HIGHFEE) and SpendsCoinbase(true) from the relative-height section, while the orphan inherits SpendsCoinbase(false) from the loop. Give the cross-section parent IDs dedicated names and set Fee and SpendsCoinbase explicitly when constructing these entries. This preserves the tested states while making the remaining dependencies explicit.