MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetBucketPosition

Method GetBucketPosition

src/addrman.cpp:30–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30int CAddrInfo::GetBucketPosition(const uint256& nKey, bool fNew, int nBucket) const
31{
32 uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << (fNew ? 'N' : 'K') << nBucket << GetKey()).GetHash().GetLow64();
33 return hash1 % ADDRMAN_BUCKET_SIZE;
34}
35
36bool CAddrInfo::IsTerrible(int64_t nNow) const
37{

Callers 5

MakeTriedMethod · 0.80
Good_Method · 0.80
Add_Method · 0.80
Check_Method · 0.80
UnserializeMethod · 0.80

Calls 3

CHashWriterClass · 0.85
GetLow64Method · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected