Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.h
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | public: | ||||
void EvictExtraOutboundPeers(int64_t time_in_seconds); | void EvictExtraOutboundPeers(int64_t time_in_seconds); | ||||
private: | private: | ||||
//! Next time to check for stale tip | //! Next time to check for stale tip | ||||
int64_t m_stale_tip_check_time; | int64_t m_stale_tip_check_time; | ||||
}; | }; | ||||
struct CNodeStateStats { | struct CNodeStateStats { | ||||
int nMisbehavior; | int nMisbehavior = 0; | ||||
int nSyncHeight; | int nSyncHeight = -1; | ||||
int nCommonHeight; | int nCommonHeight = -1; | ||||
std::vector<int> vHeightInFlight; | std::vector<int> vHeightInFlight; | ||||
}; | }; | ||||
/** Get statistics from node state */ | /** Get statistics from node state */ | ||||
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats); | bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats); | ||||
/** Increase a node's misbehavior score. */ | /** Increase a node's misbehavior score. */ | ||||
void Misbehaving(NodeId nodeid, int howmuch, const std::string &reason); | void Misbehaving(NodeId nodeid, int howmuch, const std::string &reason); | ||||
#endif // BITCOIN_NET_PROCESSING_H | #endif // BITCOIN_NET_PROCESSING_H |