| 13 | using namespace std; |
| 14 | |
| 15 | int CAddrInfo::GetTriedBucket(const uint256& nKey) const |
| 16 | { |
| 17 | uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetHash().GetLow64(); |
| 18 | uint64_t hash2 = (CHashWriter(SER_GETHASH, 0) << nKey << GetGroup() << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP)).GetHash().GetLow64(); |
| 19 | return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; |
| 20 | } |
| 21 | |
| 22 | int CAddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src) const |
| 23 | { |
no test coverage detected