Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | struct CNodeStateStats { | ||||
int nSyncHeight; | int nSyncHeight; | ||||
int nCommonHeight; | int nCommonHeight; | ||||
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); | void Misbehaving(NodeId nodeid, int howmuch, const std::string &reason); | ||||
/** Process protocol messages received from a given node */ | /** Process protocol messages received from a given node */ | ||||
bool ProcessMessages(const Config &config, CNode *pfrom, CConnman &connman, | bool ProcessMessages(const Config &config, CNode *pfrom, CConnman &connman, | ||||
const std::atomic<bool> &interrupt); | const std::atomic<bool> &interrupt); | ||||
/** | /** | ||||
* Send queued protocol messages to be sent to a give node. | * Send queued protocol messages to be sent to a give node. | ||||
* | * | ||||
* @param[in] pto The node which we are sending messages to. | * @param[in] pto The node which we are sending messages to. | ||||
* @param[in] connman The connection manager for that node. | * @param[in] connman The connection manager for that node. | ||||
* @param[in] interrupt Interrupt condition for processing threads | * @param[in] interrupt Interrupt condition for processing threads | ||||
* @return True if there is more work to be done | * @return True if there is more work to be done | ||||
*/ | */ | ||||
bool SendMessages(const Config &config, CNode *pto, CConnman &connman, | bool SendMessages(const Config &config, CNode *pto, CConnman &connman, | ||||
const std::atomic<bool> &interrupt); | const std::atomic<bool> &interrupt); | ||||
#endif // BITCOIN_NET_PROCESSING_H | #endif // BITCOIN_NET_PROCESSING_H |