Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the source code of this file.
Classes | |
class | PeerLogicValidation |
struct | CNodeStateStats |
Functions | |
bool | GetNodeStateStats (NodeId nodeid, CNodeStateStats &stats) |
Get statistics from node state. More... | |
void | Misbehaving (NodeId nodeid, int howmuch, const std::string &message="") |
Increase a node's misbehavior score. More... | |
bool | IsBanned (NodeId nodeid) |
void | EraseObjectRequest (NodeId nodeId, const CInv &inv) |
void | RequestObject (NodeId nodeId, const CInv &inv, std::chrono::microseconds current_time, bool fForce=false) |
size_t | GetRequestedObjectCount (NodeId nodeId) |
Variables | |
static const unsigned int | DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE = 10 |
Default for -maxorphantxsize, maximum size in megabytes the orphan map can grow before entries are removed. More... | |
static const int64_t | ORPHAN_TX_EXPIRE_TIME = 20 * 60 |
Expiration time for orphan transactions in seconds. More... | |
static const int64_t | ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60 |
Minimum time between orphan transactions expire time checks in seconds. More... | |
static const unsigned int | DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100 |
Default number of orphan+recently-replaced txn to keep around for block reconstruction. More... | |
static constexpr int64_t | HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000 |
Headers download timeout expressed in microseconds Timeout = base + per_header * (expected number of headers) More... | |
static constexpr int64_t | HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000 |
static constexpr int32_t | MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT = 4 |
Protect at least this many outbound peers from disconnection due to slow/ behind headers chain. More... | |
static constexpr int64_t | CHAIN_SYNC_TIMEOUT = 20 * 60 |
Timeout for (unprotected) outbound peers to sync to our chainwork, in seconds. More... | |
static constexpr int64_t | STALE_CHECK_INTERVAL = 150 |
How frequently to check for stale tips, in seconds. More... | |
static constexpr int64_t | EXTRA_PEER_CHECK_INTERVAL = 45 |
How frequently to check for extra outbound peers and disconnect, in seconds. More... | |
static constexpr int64_t | MINIMUM_CONNECT_TIME = 30 |
Minimum time an outbound-peer-eviction candidate must be connected for, in order to evict, in seconds. More... | |
static constexpr bool | DEFAULT_ENABLE_BIP61 = true |
Default for BIP61 (sending reject messages) More... | |
bool | g_enable_bip61 |
Enable BIP61 (sending reject messages) More... | |
Function Documentation
◆ EraseObjectRequest()
Definition at line 689 of file net_processing.cpp.
References AssertLockHeld(), cs_main, and EraseObjectRequest().
◆ GetNodeStateStats()
bool GetNodeStateStats | ( | NodeId | nodeid, |
CNodeStateStats & | stats | ||
) |
Get statistics from node state.
Definition at line 880 of file net_processing.cpp.
References cs_main, LOCK, CNodeStateStats::nCommonHeight, CNodeStateStats::nMisbehavior, CNodeStateStats::nSyncHeight, and CNodeStateStats::vHeightInFlight.
Referenced by getpeerinfo(), and PeerTablePriv::refreshPeers().
◆ GetRequestedObjectCount()
size_t GetRequestedObjectCount | ( | NodeId | nodeId | ) |
Definition at line 807 of file net_processing.cpp.
References AssertLockHeld(), and cs_main.
Referenced by CGovernanceManager::RequestGovernanceObjectVotes().
◆ IsBanned()
bool IsBanned | ( | NodeId | nodeid | ) |
Definition at line 1045 of file net_processing.cpp.
Referenced by llmq::CSigSharesManager::RemoveBannedNodeStates().
◆ Misbehaving()
void Misbehaving | ( | NodeId | nodeid, |
int | howmuch, | ||
const std::string & | message = "" |
||
) |
Increase a node's misbehavior score.
Definition at line 1024 of file net_processing.cpp.
References DEFAULT_BANSCORE_THRESHOLD, gArgs, ArgsManager::GetArg(), LogPrint, and BCLog::NET.
Referenced by llmq::CSigSharesManager::BanNode(), PeerLogicValidation::BlockChecked(), ProcessHeadersMessage(), llmq::CQuorumBlockProcessor::ProcessMessage(), CMNAuth::ProcessMessage(), llmq::CDKGSessionManager::ProcessMessage(), CPrivateSendServer::ProcessMessage(), CPrivateSendClientManager::ProcessMessage(), CGovernanceManager::ProcessMessage(), ProcessMessage(), llmq::CInstantSendManager::ProcessMessageInstantSendLock(), llmq::CSigningManager::ProcessMessageRecoveredSig(), llmq::CChainLocksHandler::ProcessNewChainLock(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::ProcessPendingMessageBatch(), llmq::CSigningManager::ProcessPendingRecoveredSigs(), CSporkManager::ProcessSpork(), SendBlockTransactions(), CGovernanceManager::SyncObjects(), and while().
◆ RequestObject()
void RequestObject | ( | NodeId | nodeId, |
const CInv & | inv, | ||
std::chrono::microseconds | current_time, | ||
bool | fForce = false |
||
) |
Definition at line 797 of file net_processing.cpp.
References AssertLockHeld(), cs_main, and RequestObject().
Variable Documentation
◆ CHAIN_SYNC_TIMEOUT
|
static |
Timeout for (unprotected) outbound peers to sync to our chainwork, in seconds.
Definition at line 31 of file net_processing.h.
Referenced by PeerLogicValidation::ConsiderEviction().
◆ DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN
|
static |
Default number of orphan+recently-replaced txn to keep around for block reconstruction.
Definition at line 20 of file net_processing.h.
Referenced by AddToCompactExtraTransactions(), and HelpMessage().
◆ DEFAULT_ENABLE_BIP61
|
static |
Default for BIP61 (sending reject messages)
Definition at line 41 of file net_processing.h.
Referenced by AppInitParameterInteraction(), and HelpMessage().
◆ DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE
|
static |
Default for -maxorphantxsize, maximum size in megabytes the orphan map can grow before entries are removed.
Definition at line 14 of file net_processing.h.
Referenced by HelpMessage(), and ProcessMessage().
◆ EXTRA_PEER_CHECK_INTERVAL
|
static |
How frequently to check for extra outbound peers and disconnect, in seconds.
Definition at line 36 of file net_processing.h.
Referenced by PeerLogicValidation::PeerLogicValidation().
◆ g_enable_bip61
bool g_enable_bip61 |
Enable BIP61 (sending reject messages)
Definition at line 80 of file net_processing.cpp.
Referenced by AppInitParameterInteraction(), CPrivateSendServer::ProcessMessage(), CPrivateSendClientSession::ProcessMessage(), CPrivateSendClientManager::ProcessMessage(), CGovernanceManager::ProcessMessage(), ProcessMessage(), PeerLogicValidation::ProcessMessages(), and SendRejectsAndCheckIfBanned().
◆ HEADERS_DOWNLOAD_TIMEOUT_BASE
|
static |
Headers download timeout expressed in microseconds Timeout = base + per_header * (expected number of headers)
Definition at line 24 of file net_processing.h.
Referenced by ProcessMessage(), and PeerLogicValidation::SendMessages().
◆ HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER
|
static |
Definition at line 25 of file net_processing.h.
Referenced by ProcessMessage(), and PeerLogicValidation::SendMessages().
◆ MAX_OUTBOUND_PEERS_TO_PROTECT_FROM_DISCONNECT
|
static |
Protect at least this many outbound peers from disconnection due to slow/ behind headers chain.
Definition at line 29 of file net_processing.h.
◆ MINIMUM_CONNECT_TIME
|
static |
Minimum time an outbound-peer-eviction candidate must be connected for, in order to evict, in seconds.
Definition at line 38 of file net_processing.h.
Referenced by PeerLogicValidation::EvictExtraOutboundPeers().
◆ ORPHAN_TX_EXPIRE_INTERVAL
|
static |
Minimum time between orphan transactions expire time checks in seconds.
Definition at line 18 of file net_processing.h.
Referenced by LimitOrphanTxSize().
◆ ORPHAN_TX_EXPIRE_TIME
|
static |
Expiration time for orphan transactions in seconds.
Definition at line 16 of file net_processing.h.
Referenced by AddOrphanTx(), and LimitOrphanTxSize().
◆ STALE_CHECK_INTERVAL
|
static |
How frequently to check for stale tips, in seconds.
Definition at line 34 of file net_processing.h.
Referenced by PeerLogicValidation::CheckForStaleTipAndEvictPeers(), and PeerLogicValidation::PeerLogicValidation().