Dash Core  0.12.2.1
P2P Digital Currency
net_processing.h File Reference
#include "net.h"
#include "validationinterface.h"

Go to the source code of this file.

Classes

class  PeerLogicValidation
 
struct  CNodeStateStats
 

Functions

void RegisterNodeSignals (CNodeSignals &nodeSignals)
 
void UnregisterNodeSignals (CNodeSignals &nodeSignals)
 
bool GetNodeStateStats (NodeId nodeid, CNodeStateStats &stats)
 
void Misbehaving (NodeId nodeid, int howmuch)
 
bool ProcessMessages (CNode *pfrom, CConnman &connman, std::atomic< bool > &interrupt)
 
bool SendMessages (CNode *pto, CConnman &connman, std::atomic< bool > &interrupt)
 

Variables

static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000
 
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000
 

Function Documentation

◆ GetNodeStateStats()

bool GetNodeStateStats ( NodeId  nodeid,
CNodeStateStats stats 
)

Get statistics from node state

Definition at line 468 of file net_processing.cpp.

Referenced by getpeerinfo(), and PeerTablePriv::refreshPeers().

◆ Misbehaving()

◆ ProcessMessages()

bool ProcessMessages ( CNode pfrom,
CConnman connman,
std::atomic< bool > &  interrupt 
)

Process protocol messages received from a given node

Definition at line 2184 of file net_processing.cpp.

Referenced by RegisterNodeSignals(), and UnregisterNodeSignals().

◆ RegisterNodeSignals()

void RegisterNodeSignals ( CNodeSignals nodeSignals)

Register with a network node to receive its signals

Definition at line 483 of file net_processing.cpp.

Referenced by AppInit2().

◆ SendMessages()

bool SendMessages ( CNode pto,
CConnman connman,
std::atomic< bool > &  interrupt 
)

Send queued protocol messages to be sent to a give node.

Parameters
[in]ptoThe node which we are sending messages to.
[in]connmanThe connection manager for that node.
[in]interruptInterrupt condition for processing threads
Returns
True if there is more work to be done

Definition at line 2296 of file net_processing.cpp.

Referenced by RegisterNodeSignals(), and UnregisterNodeSignals().

◆ UnregisterNodeSignals()

void UnregisterNodeSignals ( CNodeSignals nodeSignals)

Unregister a network node

Definition at line 491 of file net_processing.cpp.

Referenced by PrepareShutdown().

Variable Documentation

◆ HEADERS_DOWNLOAD_TIMEOUT_BASE

constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000
static

Headers download timeout expressed in microseconds Timeout = base + per_header * (expected number of headers)

Definition at line 14 of file net_processing.h.

Referenced by SendMessages().

◆ HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER

constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000
static

Definition at line 15 of file net_processing.h.

Referenced by SendMessages().