Avoid test-before-evict evictions of current peers
Summary:
Outbound peer logic prevents connecting to addresses that we're already
connected to, so prevent inadvertent eviction of current peers via
test-before-evict by checking this condition and marking current peer's
addresses as Good().
Co-authored-by: John Newbery <john@johnnewbery.com>
This is a backport of core#20187 [4/4]
https://github.com/bitcoin/bitcoin/pull/20187/commits/16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751
Depends on D10696
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10697