7 #ifndef RAVEN_NET_PROCESSING_H 8 #define RAVEN_NET_PROCESSING_H 15 static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
17 static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
19 static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
21 static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100;
24 static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000;
25 static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000;
29 static constexpr int32_t MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT = 4;
31 static constexpr int64_t CHAIN_SYNC_TIMEOUT = 20 * 60;
33 static constexpr int64_t STALE_CHECK_INTERVAL = 10 * 60;
35 static constexpr int64_t EXTRA_PEER_CHECK_INTERVAL = 45;
37 static constexpr int64_t MINIMUM_CONNECT_TIME = 30;
46 void BlockConnected(
const std::shared_ptr<const CBlock>& pblock,
const CBlockIndex* pindexConnected,
const std::vector<CTransactionRef>& vtxConflicted)
override;
85 #endif // RAVEN_NET_PROCESSING_H
void Misbehaving(NodeId nodeid, int howmuch)
Increase a node's misbehavior score.
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners of updated block chain tip.
void CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams)
void EvictExtraOutboundPeers(int64_t time_in_seconds)
Interface for message handling.
bool ProcessMessages(CNode *pfrom, std::atomic< bool > &interrupt) override
Process protocol messages received from a given node.
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats)
Get statistics from node state.
Parameters that influence chain consensus.
int64_t m_stale_tip_check_time
void BlockConnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexConnected, const std::vector< CTransactionRef > &vtxConflicted) override
Notifies listeners of a block being connected.
void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr< const CBlock > &pblock) override
Notifies listeners that a block which builds directly on our current tip has been received and connec...
The block chain is a tree shaped structure starting with the genesis block at the root...
void BlockChecked(const CBlock &block, const CValidationState &state) override
Notifies listeners of a block validation result.
void ConsiderEviction(CNode *pto, int64_t time_in_seconds)
void FinalizeNode(NodeId nodeid, bool &fUpdateConnectionTime) override
PeerLogicValidation(CConnman *connman, CScheduler &scheduler)
Information about a peer.
std::vector< int > vHeightInFlight
void InitializeNode(CNode *pnode) override
bool SendMessages(CNode *pto, std::atomic< bool > &interrupt) override
Send queued protocol messages to be sent to a give node.