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 <cmath> | #include <cmath> | ||||
int CAddrInfo::GetTriedBucket(const uint256 &nKey) const { | int CAddrInfo::GetTriedBucket(const uint256 &nKey) const { | ||||
uint64_t hash1 = | uint64_t hash1 = | ||||
(CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetCheapHash(); | (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetCheapHash(); | ||||
uint64_t hash2 = | uint64_t hash2 = | ||||
(CHashWriter(SER_GETHASH, 0) | (CHashWriter(SER_GETHASH, 0) | ||||
▲ Show 20 Lines • Show All 695 Lines • Show Last 20 Lines |