[net, addrman] Remove external dependencies on CAddrInfo objects

CAddrInfo objects are an implementation detail of how AddrMan manages and adds
metadata to different records. Encapsulate this logic by updating Select &
SelectTriedCollision to return the additional info that the callers need.
This commit is contained in:
Amiti Uttarwar
2021-08-25 15:40:59 -07:00
parent 8af5b54f97
commit 7cba9d5618
6 changed files with 70 additions and 60 deletions

View File

@@ -87,7 +87,7 @@ static void AddrManSelect(benchmark::Bench& bench)
bench.run([&] {
const auto& address = addrman.Select();
assert(address.GetPort() > 0);
assert(address.first.GetPort() > 0);
});
}