| 27 | |
| 28 | |
| 29 | int AddrInfo::GetTriedBucket(const uint256& nKey, const NetGroupManager& netgroupman) const |
| 30 | { |
| 31 | uint64_t hash1 = (HashWriter{} << nKey << GetKey()).GetCheapHash(); |
| 32 | uint64_t hash2 = (HashWriter{} << nKey << netgroupman.GetGroup(*this) << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP)).GetCheapHash(); |
| 33 | return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; |
| 34 | } |
| 35 | |
| 36 | int AddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src, const NetGroupManager& netgroupman) const |
| 37 | { |