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

Method GetBucketPosition

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

Source from the content-addressed store, hash-verified

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

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
GetCheapHashMethod · 0.80
GetHashMethod · 0.45

Tested by

no test coverage detected