Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | struct CNodeStateStats { | ||||
std::vector<int> vHeightInFlight; | std::vector<int> vHeightInFlight; | ||||
uint64_t m_addr_processed = 0; | uint64_t m_addr_processed = 0; | ||||
uint64_t m_addr_rate_limited = 0; | uint64_t m_addr_rate_limited = 0; | ||||
bool m_addr_relay_enabled{false}; | bool m_addr_relay_enabled{false}; | ||||
}; | }; | ||||
class PeerManager : public CValidationInterface, public NetEventsInterface { | class PeerManager : public CValidationInterface, public NetEventsInterface { | ||||
public: | public: | ||||
static std::unique_ptr<PeerManager> | static std::unique_ptr<PeerManager> make(const CChainParams &chainparams, | ||||
make(const CChainParams &chainparams, CConnman &connman, BanMan *banman, | CConnman &connman, BanMan *banman, | ||||
CScheduler &scheduler, ChainstateManager &chainman, CTxMemPool &pool, | ChainstateManager &chainman, | ||||
CTxMemPool &pool, | |||||
bool ignore_incoming_txs); | bool ignore_incoming_txs); | ||||
virtual ~PeerManager() {} | virtual ~PeerManager() {} | ||||
/** Begin running background tasks, should only be called once */ | |||||
virtual void StartScheduledTasks(CScheduler &scheduler) = 0; | |||||
/** Get statistics from node state */ | /** Get statistics from node state */ | ||||
virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) = 0; | virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) = 0; | ||||
/** Whether this node ignores txs received over p2p. */ | /** Whether this node ignores txs received over p2p. */ | ||||
virtual bool IgnoresIncomingTxs() = 0; | virtual bool IgnoresIncomingTxs() = 0; | ||||
/** Send ping message to all peers */ | /** Send ping message to all peers */ | ||||
virtual void SendPings() = 0; | virtual void SendPings() = 0; | ||||
Show All 33 Lines |