1 major finding · 2 suggestions
Findings
[major] · ccoins_write expects an unreachable overwrite exception
The recorded focused coins_tests/ccoins_write run fails four assertions because VALUE2_CLEAN children cannot throw EX_OVERWRITE_UNSPENT; removing only those new expectations makes it pass.
Location: src/test/coins_tests.cpp:863 (head).
Details and suggested fix
CheckWriteCoins passes the child through WriteCoinsViewEntry, whose insertion helper links entries into the cursor only when DIRTY or FRESH is set. VALUE2_CLEAN has neither flag, so the cursor is empty and BatchWrite leaves the parent unchanged. BatchWrite also never calls AddCoin, which implements the expected overwrite rejection. The existing non-DIRTY loop already checks these exact parent/child combinations and expects no exception. Remove the four new EX_OVERWRITE_UNSPENT calls and their explanatory comment; the actual overwrite rejection is already covered by ccoins_add.
Optional improvements
[suggestion] · The new EX_FRESH_MISAPPLIED block repeats existing cases
The four added EX_FRESH_MISAPPLIED assertions duplicate existing cases and provide no new failure-case coverage.
Location: src/test/coins_tests.cpp:869 (head).
Details and suggested fix
The calls at lines 829, 831, 833 and 835 already pair each of these four unspent parent states with SPENT_DIRTY_FRESH and expect EX_FRESH_MISAPPLIED. Each CheckWriteCoins invocation creates a fresh SingleEntryCacheTest, so the new block repeats the same scenarios rather than testing another cache transition. Remove the duplicate block and its comment; the existing assertions preserve all of this coverage.
[suggestion] · tor.md incorrectly attributes Tor miscounting to getnetworkinfo
getnetworkinfo has no per-network peer counts; the documented classification issue affects getpeerinfo's network field and the counts derived from it by -netinfo.
Location: doc/tor.md:231 (head).
Details and suggested fix
getnetworkinfo obtains its connection counts from GetNodeCount, which filters only by direction, while its networks array reports reachability and proxy settings. Neither uses individual peers' network classification. Replace getnetworkinfo in the warning with the network field of getpeerinfo, which supplies -netinfo's per-network counts. Describe these peers as not labeled onion, rather than necessarily counted as IPv4/IPv6: the fallback uses the Tor daemon's source-address class and may be unroutable for a local daemon.