Page MenuHomePhabricator

[addrman] Make addrman consistency checks a runtime option
ClosedPublic

Authored by Fabien on Oct 17 2022, 10:10.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC88622d9c021c: [addrman] Make addrman consistency checks a runtime option
Summary
Currently addrman consistency checks are a compile time option, and are not enabled in our CI. It's unlikely anyone is running these consistency checks.
Make them a runtime option instead, where users can enable addrman consistency checks every n operations (similar to mempool tests). Update the addrman unit tests to do internal consistency checks every 100 operations (checking on every operations causes the test runtime to
increase by several seconds).

Completes backport of core#20233:
https://github.com/bitcoin/bitcoin/pull/20233/commits/a4d78546b0858602c60c03fdf8b35ca666ab2e56#diff-259675a17ed61244b5f1f5857285bdab63cc81f41334ed64c74ba623b61cf2a2

Includes a fix to prevent the build from failing on 32 bits platforms.

Depends on D12271.

Test Plan
ninja all check
ninja bitcoin-fuzzers

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable