Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.h
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | public: | ||||
CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams); | CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams); | ||||
/** | /** | ||||
* If we have extra outbound peers, try to disconnect the one with the | * If we have extra outbound peers, try to disconnect the one with the | ||||
* oldest block announcement. | * oldest block announcement. | ||||
*/ | */ | ||||
void EvictExtraOutboundPeers(int64_t time_in_seconds) | void EvictExtraOutboundPeers(int64_t time_in_seconds) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** Process a single message from a peer. Public for fuzz testing */ | |||||
void ProcessMessage(const Config &config, CNode &pfrom, | |||||
const std::string &msg_type, CDataStream &vRecv, | |||||
int64_t nTimeReceived, | |||||
const std::atomic<bool> &interruptMsgProc); | |||||
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 = 0; | int nMisbehavior = 0; | ||||
int nSyncHeight = -1; | int nSyncHeight = -1; | ||||
Show All 9 Lines | |||||
* might be disconnected and added to the discouragement filter. | * might be disconnected and added to the discouragement filter. | ||||
*/ | */ | ||||
void Misbehaving(NodeId nodeid, int howmuch, const std::string &message = "") | void Misbehaving(NodeId nodeid, int howmuch, const std::string &message = "") | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
/** Relay transaction to every node */ | /** Relay transaction to every node */ | ||||
void RelayTransaction(const TxId &txid, const CConnman &connman); | void RelayTransaction(const TxId &txid, const CConnman &connman); | ||||
void ProcessMessage(const Config &config, CNode &pfrom, | |||||
const std::string &msg_type, CDataStream &vRecv, | |||||
int64_t nTimeReceived, CTxMemPool &mempool, | |||||
ChainstateManager &chainman, CConnman &connman, | |||||
BanMan *banman, const std::atomic<bool> &interruptMsgProc); | |||||
#endif // BITCOIN_NET_PROCESSING_H | #endif // BITCOIN_NET_PROCESSING_H |