HomePhabricator

addrman: tidy up unit tests

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D19045

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Nov 1 2021, 15:32
PiRKCommitted on Thu, Dec 4, 12:05
PiRKPushed on Thu, Dec 4, 12:05
Reviewer
Restricted Project
Differential Revision
D19045: addrman: tidy up unit tests
Parents
rABCcdff4f1d69cc: [e.cash] Add video to about page
Branches
Unknown
Tags
Unknown
References
HEAD -> master