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

Method GetTriedBucket

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

Source from the content-addressed store, hash-verified

27
28
29int AddrInfo::GetTriedBucket(const uint256& nKey, const NetGroupManager& netgroupman) const
30{
31 uint64_t hash1 = (HashWriter{} << nKey << GetKey()).GetCheapHash();
32 uint64_t hash2 = (HashWriter{} << nKey << netgroupman.GetGroup(*this) << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP)).GetCheapHash();
33 return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
34}
35
36int AddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src, const NetGroupManager& netgroupman) const
37{

Callers 8

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

Calls 2

GetCheapHashMethod · 0.80
GetGroupMethod · 0.80

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64