@@ -15,12 +15,12 @@ int CAddrInfo::GetTriedBucket(const std::vector<unsigned char>& nKey) const
1515 CDataStream ss1 (SER_GETHASH, 0 );
1616 std::vector<unsigned char > vchKey = GetKey ();
1717 ss1 << nKey << vchKey;
18- uint64_t hash1 = Hash (ss1.begin (), ss1.end ()).GetLow64 ();
18+ uint64_t hash1 = Hash (ss1.begin (), ss1.end ()).GetCheapHash ();
1919
2020 CDataStream ss2 (SER_GETHASH, 0 );
2121 std::vector<unsigned char > vchGroupKey = GetGroup ();
2222 ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
23- uint64_t hash2 = Hash (ss2.begin (), ss2.end ()).GetLow64 ();
23+ uint64_t hash2 = Hash (ss2.begin (), ss2.end ()).GetCheapHash ();
2424 return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
2525}
2626
@@ -30,11 +30,11 @@ int CAddrInfo::GetNewBucket(const std::vector<unsigned char>& nKey, const CNetAd
3030 std::vector<unsigned char > vchGroupKey = GetGroup ();
3131 std::vector<unsigned char > vchSourceGroupKey = src.GetGroup ();
3232 ss1 << nKey << vchGroupKey << vchSourceGroupKey;
33- uint64_t hash1 = Hash (ss1.begin (), ss1.end ()).GetLow64 ();
33+ uint64_t hash1 = Hash (ss1.begin (), ss1.end ()).GetCheapHash ();
3434
3535 CDataStream ss2 (SER_GETHASH, 0 );
3636 ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
37- uint64_t hash2 = Hash (ss2.begin (), ss2.end ()).GetLow64 ();
37+ uint64_t hash2 = Hash (ss2.begin (), ss2.end ()).GetCheapHash ();
3838 return hash2 % ADDRMAN_NEW_BUCKET_COUNT;
3939}
4040
0 commit comments