diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-01-06 10:27:17 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-01-06 10:29:08 +0100 |
| commit | ab086e0bd39b6d010c040c9bf4d781400fc7b9f8 (patch) | |
| tree | 95daef41f0c8eba5ed51dc6b7135d780dac50647 /src/addrman.cpp | |
| parent | Merge pull request #3468 (diff) | |
| parent | Unittests for uint256.h (diff) | |
| download | discoin-ab086e0bd39b6d010c040c9bf4d781400fc7b9f8.tar.xz discoin-ab086e0bd39b6d010c040c9bf4d781400fc7b9f8.zip | |
Merge pull request #3422
daa6b20 Unittests for uint256.h (Thomas Holenstein)
e85e19b Changed Get64(.) to GetLow64() (Thomas Holenstein)
Diffstat (limited to 'src/addrman.cpp')
| -rw-r--r-- | src/addrman.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index 815da07c9..46b4a9493 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -14,12 +14,12 @@ int CAddrInfo::GetTriedBucket(const std::vector<unsigned char> &nKey) const CDataStream ss1(SER_GETHASH, 0); std::vector<unsigned char> vchKey = GetKey(); ss1 << nKey << vchKey; - uint64_t hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64(); CDataStream ss2(SER_GETHASH, 0); std::vector<unsigned char> vchGroupKey = GetGroup(); ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP); - uint64_t hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64(); return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; } @@ -29,11 +29,11 @@ int CAddrInfo::GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAd std::vector<unsigned char> vchGroupKey = GetGroup(); std::vector<unsigned char> vchSourceGroupKey = src.GetGroup(); ss1 << nKey << vchGroupKey << vchSourceGroupKey; - uint64_t hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64(); CDataStream ss2(SER_GETHASH, 0); ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP); - uint64_t hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64(); return hash2 % ADDRMAN_NEW_BUCKET_COUNT; } |