Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
net_processing.h
Go to the documentation of this file.
14 static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE = 10; // this allows around 100 TXs of max size (and many more of normal size)
52 void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected, const std::vector<CTransactionRef>& vtxConflicted) override;
53 void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
55 void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) override;
93 void RequestObject(NodeId nodeId, const CInv& inv, std::chrono::microseconds current_time, bool fForce=false);
static constexpr bool DEFAULT_ENABLE_BIP61
Default for BIP61 (sending reject messages)
Definition: net_processing.h:41
Definition: block.h:72
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners of updated block chain tip.
Definition: net_processing.cpp:1184
void CheckForStaleTipAndEvictPeers(const Consensus::Params &consensusParams)
Definition: net_processing.cpp:3777
Definition: net_processing.h:79
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER
Definition: net_processing.h:25
Definition: net_processing.h:45
void RequestObject(NodeId nodeId, const CInv &inv, std::chrono::microseconds current_time, bool fForce=false)
Definition: net_processing.cpp:797
void EvictExtraOutboundPeers(int64_t time_in_seconds)
Definition: net_processing.cpp:3720
static constexpr int64_t EXTRA_PEER_CHECK_INTERVAL
How frequently to check for extra outbound peers and disconnect, in seconds.
Definition: net_processing.h:36
static constexpr int64_t MINIMUM_CONNECT_TIME
Minimum time an outbound-peer-eviction candidate must be connected for, in order to evict...
Definition: net_processing.h:38
Definition: validationinterface.h:64
bool ProcessMessages(CNode *pfrom, std::atomic< bool > &interrupt) override
Process protocol messages received from a given node.
Definition: net_processing.cpp:3542
size_t GetRequestedObjectCount(NodeId nodeId)
Definition: net_processing.cpp:807
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats)
Get statistics from node state.
Definition: net_processing.cpp:880
void Misbehaving(NodeId nodeid, int howmuch, const std::string &message="")
Increase a node's misbehavior score.
Definition: net_processing.cpp:1024
static const int64_t ORPHAN_TX_EXPIRE_INTERVAL
Minimum time between orphan transactions expire time checks in seconds.
Definition: net_processing.h:18
PeerLogicValidation(CConnman *connmanIn, CScheduler &scheduler)
Definition: net_processing.cpp:1079
static const int64_t ORPHAN_TX_EXPIRE_TIME
Expiration time for orphan transactions in seconds.
Definition: net_processing.h:16
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE
Headers download timeout expressed in microseconds Timeout = base + per_header * (expected number of ...
Definition: net_processing.h:24
int64_t m_stale_tip_check_time
Definition: net_processing.h:76
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.
Definition: net_processing.cpp:1092
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...
Definition: net_processing.cpp:1145
static constexpr int32_t MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT
Protect at least this many outbound peers from disconnection due to slow/ behind headers chain...
Definition: net_processing.h:29
void EraseObjectRequest(NodeId nodeId, const CInv &inv)
Definition: net_processing.cpp:689
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
static constexpr int64_t CHAIN_SYNC_TIMEOUT
Timeout for (unprotected) outbound peers to sync to our chainwork, in seconds.
Definition: net_processing.h:31
static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN
Default number of orphan+recently-replaced txn to keep around for block reconstruction.
Definition: net_processing.h:20
void BlockChecked(const CBlock &block, const CValidationState &state) override
Notifies listeners of a block validation result.
Definition: net_processing.cpp:1217
void ConsiderEviction(CNode *pto, int64_t time_in_seconds)
Definition: net_processing.cpp:3667
void FinalizeNode(NodeId nodeid, bool &fUpdateConnectionTime) override
Definition: net_processing.cpp:845
Definition: scheduler.h:37
void InitializeNode(CNode *pnode) override
Definition: net_processing.cpp:833
static constexpr int64_t STALE_CHECK_INTERVAL
How frequently to check for stale tips, in seconds.
Definition: net_processing.h:34
bool SendMessages(CNode *pto, std::atomic< bool > &interrupt) override
Send queued protocol messages to be sent to a give node.
Definition: net_processing.cpp:3816
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE
Default for -maxorphantxsize, maximum size in megabytes the orphan map can grow before entries are re...
Definition: net_processing.h:14