1 suggestion
Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.
Optional improvements
[suggestion] · getblocktemplate retains a dead post-creation null check
The new NotNullUniquePtr return contract leaves getblocktemplate's pre-existing post-assignment null check redundant, retaining an untestable error branch that the other mining RPC changes remove.
Location: src/rpc/mining.cpp:909 (head).
Details and suggested fix
On refresh, CreateNewTemplate({}) returns a fresh NotNull result that is consumed once into the static std::unique_ptr. Assembly failures throw before the assignment, so they cannot reach CHECK_NONFATAL(block_template). Remove this check as well. Keep the nullable cache and CHECK_NONFATAL(pindexPrev): the cache starts empty, and pindexPrev is cleared before refresh and set only after a successful assignment. If creation throws, the null pindexPrev forces a retry on the next call. This removes unreachable error handling without changing RPC behavior.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Pimpl conversions leave four unused <memory> includes (earlier report)
- [suggestion]: waitNext reconstructs a NotNull guarantee discarded by the manager (earlier report)