| 982 | } |
| 983 | |
| 984 | std::optional<AddressPosition> AddrManImpl::FindAddressEntry_(const CAddress& addr) |
| 985 | { |
| 986 | AssertLockHeld(cs); |
| 987 | |
| 988 | AddrInfo* addr_info = Find(addr); |
| 989 | |
| 990 | if (!addr_info) return std::nullopt; |
| 991 | |
| 992 | if(addr_info->fInTried) { |
| 993 | int bucket{addr_info->GetTriedBucket(nKey, m_netgroupman)}; |
| 994 | return AddressPosition(/*tried_in=*/true, |
| 995 | /*multiplicity_in=*/1, |
| 996 | /*bucket_in=*/bucket, |
| 997 | /*position_in=*/addr_info->GetBucketPosition(nKey, false, bucket)); |
| 998 | } else { |
| 999 | int bucket{addr_info->GetNewBucket(nKey, m_netgroupman)}; |
| 1000 | return AddressPosition(/*tried_in=*/false, |
| 1001 | /*multiplicity_in=*/addr_info->nRefCount, |
| 1002 | /*bucket_in=*/bucket, |
| 1003 | /*position_in=*/addr_info->GetBucketPosition(nKey, true, bucket)); |
| 1004 | } |
| 1005 | } |
| 1006 | |
| 1007 | size_t AddrManImpl::Size_(std::optional<Network> net, std::optional<bool> in_new) const |
| 1008 | { |
nothing calls this directly
no test coverage detected