6 #ifndef FABCOIN_NET_PROCESSING_H 7 #define FABCOIN_NET_PROCESSING_H 14 static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
16 static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
18 static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
20 static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100;
23 static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000;
24 static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000;
28 static constexpr int32_t MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT = 4;
30 static constexpr int64_t CHAIN_SYNC_TIMEOUT = 20 * 60;
32 static constexpr int64_t STALE_CHECK_INTERVAL = 1.25 * 60;
34 static constexpr int64_t EXTRA_PEER_CHECK_INTERVAL = 45;
36 static constexpr int64_t MINIMUM_CONNECT_TIME = 30;
45 void BlockConnected(
const std::shared_ptr<const CBlock>& pblock,
const CBlockIndex* pindexConnected,
const std::vector<CTransactionRef>& vtxConflicted)
override;
84 #endif // FABCOIN_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.
Capture information about block/transaction validation.
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.