Changeset View
Changeset View
Standalone View
Standalone View
src/addrman.cpp
// Copyright (c) 2012 Pieter Wuille | // Copyright (c) 2012 Pieter Wuille | ||||
// Copyright (c) 2012-2016 The Bitcoin Core developers | // Copyright (c) 2012-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "addrman.h" | #include <addrman.h> | ||||
#include "hash.h" | #include <hash.h> | ||||
#include "serialize.h" | #include <serialize.h> | ||||
#include "streams.h" | #include <streams.h> | ||||
#include <cmath> | #include <cmath> | ||||
int CAddrInfo::GetTriedBucket(const uint256 &nKey) const { | int CAddrInfo::GetTriedBucket(const uint256 &nKey) const { | ||||
uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()) | uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()) | ||||
.GetHash() | .GetHash() | ||||
.GetCheapHash(); | .GetCheapHash(); | ||||
uint64_t hash2 = | uint64_t hash2 = | ||||
▲ Show 20 Lines • Show All 701 Lines • Show Last 20 Lines |