MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetBucketPosition

Method GetBucketPosition

src/addrman.cpp:27–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 7

MakeTriedMethod · 0.80
Good_Method · 0.80
Add_Method · 0.80
Check_Method · 0.80
ResolveCollisions_Method · 0.80
SelectTriedCollision_Method · 0.80
UnserializeMethod · 0.80

Calls 3

CHashWriterClass · 0.85
GetCheapHashMethod · 0.80
GetHashMethod · 0.45

Tested by

no test coverage detected