Two fixups for #26847:
- Now that
AddrMan::Size()
performs internal consistency tests (it didn’t before), we can’t call it in theload_addrman_corrupted
unit tests, where we deal with an artificially corruptedAddrMan
. This would fail the test when using-checkaddrman=1
(leading to spurious CI fails). Therefore remove the tests assertion, which is not particularly helpful anyway (in production we abort init when peers.dat is corrupted instead of querying AddrMan in its corrupted state).
(See #26847 (comment)) - Use
std::nullopt
instead of{}
for default args (suggested in #26847 (review))