1 suggestion
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Optional improvements
[suggestion] · The not-on-tip result lacks an enum assertion
Existing tests do not distinguish BLOCK_INCONCLUSIVE from another nonzero result, though no current TestBlockValidity() caller inspects the enum.
Location: src/validation.cpp:4566 (head).
Details and suggested fix
The proposal test checks the reject string, and the IPC duplicate-block case checks the boolean and reason. Neither interface exposes GetResult(). The new Assume(result != Result{}) would also accept BLOCK_CONSENSUS, leaving those assertions unchanged. Add a direct unit test with an initialized chain fixture such as TestChain100Setup: hold cs_main, give a CBlock a parent different from the current tip, and call TestBlockValidity() with proof-of-work and merkle-root checks disabled. Assert IsInvalid(), GetResult() == BlockValidationResult::BLOCK_INCONCLUSIVE, and the inconclusive-not-best-prevblk reason. This return precedes CheckBlock(), so no solved or otherwise valid block is required.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Clarify whether this invariant must hold in production