Not sure whether this is desirable, so marking as a proof of concept.
This moves the Peer and PeerManagerImpl declarations to their own header file, peerman_impl.h, which can be included by net_processing.cpp and the test/bench/fuzz files.
The benefits of this are:
- PeerManagerImplfunctions which are exposed through the- PeerManagerinterface for testing, but would otherwise be private can be removed from- PeerManager. That means that- PeerManagertruly is net_processing’s minimal interface to expose to the rest of the program.
- If a test needs to directly manipulate Peerobjects, it can do so, since they’re exposed in peerman_impl header.