```
Now that no bitcoind callers require knowledge of the CAddrInfo object, it can be moved into the test-only header file.
```
Partial backport of core#22950:
https://github.com/bitcoin/bitcoin/pull/22950/commits/e3f1ea659c9eb1e8be4579923d6acaaab148c2ef#diff-164bd9e2e30f54d0a79eb7cc372309e2f2155edc6c3f051290ab078f03f6a771
Depends on D12330.