Page MenuHomePhabricator

addrman: tidy up unit tests
ClosedPublic

Authored by PiRK on Thu, Dec 4, 10:43.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC17c06149ddd9: addrman: tidy up unit tests
Summary

[addrman] Remove AddrMan friends

AddrMan's friends both inherit from AddrMan, so just make the private
member protected and remove the friends.

[addrman] [tests] Tidy up unused arguments in addrman test functions

[addrman] [tests] Remove AddrManCorrupted subclass

It's only used to create a corrupted peers.dat file. We can do that directly
in a pure function.

[addrman] [tests] Remove AddrManUncorrupted subclass

It doesn't do anything different from the base AddrMan class.

This is a backport of core#23477

Commit 7784a9a (*Remove deterministic argument and member from AddrManTest*) is not applicable as it was done in D11827

Test Plan

ninja check

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Thu, Dec 4, 10:43
PiRK added inline comments.
src/addrman.h
66–67 ↗(On Diff #56856)

Unrelated to the PR, but it seems cleaner to me to not have the blank line between the doxygen doc and the only class in this header

This revision is now accepted and ready to land.Thu, Dec 4, 11:48
This revision was automatically updated to reflect the committed changes.