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

Method GetBucketPosition

src/addrman.cpp:44–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44int AddrInfo::GetBucketPosition(const uint256& nKey, bool fNew, int bucket) const
45{
46 uint64_t hash1 = (HashWriter{} << nKey << (fNew ? uint8_t{'N'} : uint8_t{'K'}) << bucket << GetKey()).GetCheapHash();
47 return hash1 % ADDRMAN_BUCKET_SIZE;
48}
49
50bool AddrInfo::IsTerrible(NodeSeconds now) const
51{

Callers 8

UnserializeMethod · 0.80
MakeTriedMethod · 0.80
AddSingleMethod · 0.80
Good_Method · 0.80
ResolveCollisions_Method · 0.80
SelectTriedCollision_Method · 0.80
FindAddressEntry_Method · 0.80
CheckAddrmanMethod · 0.80

Calls 1

GetCheapHashMethod · 0.80

Tested by

no test coverage detected