Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2019 The Bitcoin Core developers | // Copyright (c) 2009-2019 The Bitcoin Core developers | ||||
// Copyright (c) 2017-2019 The Bitcoin developers | // Copyright (c) 2017-2019 The Bitcoin 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. | ||||
#ifndef BITCOIN_NET_H | #ifndef BITCOIN_NET_H | ||||
#define BITCOIN_NET_H | #define BITCOIN_NET_H | ||||
#include <addrdb.h> | #include <addrdb.h> | ||||
#include <addrman.h> | #include <addrman.h> | ||||
#include <amount.h> | #include <amount.h> | ||||
#include <avalanche/delegation.h> | #include <avalanche/delegation.h> | ||||
#include <avalanche/node.h> // for PeerId | |||||
#include <bloom.h> | #include <bloom.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <compat.h> | #include <compat.h> | ||||
#include <crypto/siphash.h> | #include <crypto/siphash.h> | ||||
#include <hash.h> | #include <hash.h> | ||||
#include <net_permissions.h> | #include <net_permissions.h> | ||||
#include <netaddress.h> | #include <netaddress.h> | ||||
#include <nodeid.h> | #include <nodeid.h> | ||||
▲ Show 20 Lines • Show All 1,292 Lines • ▼ Show 20 Lines | struct NodeEvictionCandidate { | ||||
int64_t nLastTXTime; | int64_t nLastTXTime; | ||||
bool fRelevantServices; | bool fRelevantServices; | ||||
bool fRelayTxes; | bool fRelayTxes; | ||||
bool fBloomFilter; | bool fBloomFilter; | ||||
uint64_t nKeyedNetGroup; | uint64_t nKeyedNetGroup; | ||||
bool prefer_evict; | bool prefer_evict; | ||||
bool m_is_local; | bool m_is_local; | ||||
double availabilityScore; | double availabilityScore; | ||||
PeerId peerid; | |||||
}; | }; | ||||
[[nodiscard]] std::optional<NodeId> | [[nodiscard]] std::optional<NodeId> | ||||
SelectNodeToEvict(std::vector<NodeEvictionCandidate> &&vEvictionCandidates); | SelectNodeToEvict(std::vector<NodeEvictionCandidate> &&vEvictionCandidates); | ||||
#endif // BITCOIN_NET_H | #endif // BITCOIN_NET_H |