Bitcoin
|
Classes | |
struct | ChainSyncTimeoutState |
struct | TxDownloadState |
Public Member Functions | |
CNodeState (CAddress addrIn, std::string addrNameIn, bool is_inbound, bool is_manual) | |
Public Attributes | |
const CService | address |
The peer's address. More... | |
bool | fCurrentlyConnected |
Whether we have a fully established connection. More... | |
int | nMisbehavior |
Accumulated misbehaviour score for this peer. More... | |
bool | fShouldBan |
Whether this peer should be disconnected and banned (unless whitelisted). More... | |
const std::string | name |
String name of this peer (debugging/logging purposes). More... | |
std::vector< CBlockReject > | rejects |
List of asynchronously-determined block rejections to notify this peer about. More... | |
const CBlockIndex * | pindexBestKnownBlock |
The best known block we know this peer has announced. More... | |
uint256 | hashLastUnknownBlock |
The hash of the last unknown block this peer has announced. More... | |
const CBlockIndex * | pindexLastCommonBlock |
The last full block we both have. More... | |
const CBlockIndex * | pindexBestHeaderSent |
The best header we have sent our peer. More... | |
int | nUnconnectingHeaders |
Length of current-streak of unconnecting headers announcements. More... | |
bool | fSyncStarted |
Whether we've started headers synchronization with this peer. More... | |
int64_t | nHeadersSyncTimeout |
When to potentially disconnect peer for stalling headers download. More... | |
int64_t | nStallingSince |
Since when we're stalling block download progress (in microseconds), or 0. More... | |
std::list< QueuedBlock > | vBlocksInFlight |
int64_t | nDownloadingSince |
When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty. More... | |
int | nBlocksInFlight |
int | nBlocksInFlightValidHeaders |
bool | fPreferredDownload |
Whether we consider this a preferred download peer. More... | |
bool | fPreferHeaders |
Whether this peer wants invs or headers (when possible) for block announcements. More... | |
bool | fPreferHeaderAndIDs |
Whether this peer wants invs or cmpctblocks (when possible) for block announcements. More... | |
bool | fProvidesHeaderAndIDs |
bool | fHaveWitness |
Whether this peer can give us witnesses. More... | |
bool | fWantsCmpctWitness |
Whether this peer wants witnesses in cmpctblocks/blocktxns. More... | |
bool | fSupportsDesiredCmpctVersion |
ChainSyncTimeoutState | m_chain_sync |
int64_t | m_last_block_announcement |
Time of last new block announcement. More... | |
TxDownloadState | m_tx_download |
bool | m_is_inbound |
Whether this peer is an inbound connection. More... | |
bool | m_is_manual_connection |
Whether this peer is a manual connection. More... | |
Maintain validation-specific state about nodes, protected by cs_main, instead by CNode's own locks. This simplifies asynchronous operation, where processing of incoming data is done after the ProcessMessage call returns, and we're no longer holding the node's locks.
|
inline |
const CService anonymous_namespace{net_processing.cpp}::CNodeState::address |
The peer's address.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fCurrentlyConnected |
Whether we have a fully established connection.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fHaveWitness |
Whether this peer can give us witnesses.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fPreferHeaderAndIDs |
Whether this peer wants invs or cmpctblocks (when possible) for block announcements.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fPreferHeaders |
Whether this peer wants invs or headers (when possible) for block announcements.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fPreferredDownload |
Whether we consider this a preferred download peer.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fProvidesHeaderAndIDs |
Whether this peer will send us cmpctblocks if we request them. This is not used to gate request logic, as we really only care about fSupportsDesiredCmpctVersion, but is used as a flag to "lock in" the version of compact blocks (fWantsCmpctWitness) we send.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fShouldBan |
Whether this peer should be disconnected and banned (unless whitelisted).
bool anonymous_namespace{net_processing.cpp}::CNodeState::fSupportsDesiredCmpctVersion |
If we've announced NODE_WITNESS to this peer: whether the peer sends witnesses in cmpctblocks/blocktxns, otherwise: whether this peer sends non-witnesses in cmpctblocks/blocktxns.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fSyncStarted |
Whether we've started headers synchronization with this peer.
bool anonymous_namespace{net_processing.cpp}::CNodeState::fWantsCmpctWitness |
Whether this peer wants witnesses in cmpctblocks/blocktxns.
uint256 anonymous_namespace{net_processing.cpp}::CNodeState::hashLastUnknownBlock |
The hash of the last unknown block this peer has announced.
ChainSyncTimeoutState anonymous_namespace{net_processing.cpp}::CNodeState::m_chain_sync |
bool anonymous_namespace{net_processing.cpp}::CNodeState::m_is_inbound |
Whether this peer is an inbound connection.
bool anonymous_namespace{net_processing.cpp}::CNodeState::m_is_manual_connection |
Whether this peer is a manual connection.
int64_t anonymous_namespace{net_processing.cpp}::CNodeState::m_last_block_announcement |
Time of last new block announcement.
TxDownloadState anonymous_namespace{net_processing.cpp}::CNodeState::m_tx_download |
const std::string anonymous_namespace{net_processing.cpp}::CNodeState::name |
String name of this peer (debugging/logging purposes).
int anonymous_namespace{net_processing.cpp}::CNodeState::nBlocksInFlight |
int anonymous_namespace{net_processing.cpp}::CNodeState::nBlocksInFlightValidHeaders |
int64_t anonymous_namespace{net_processing.cpp}::CNodeState::nDownloadingSince |
When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty.
int64_t anonymous_namespace{net_processing.cpp}::CNodeState::nHeadersSyncTimeout |
When to potentially disconnect peer for stalling headers download.
int anonymous_namespace{net_processing.cpp}::CNodeState::nMisbehavior |
Accumulated misbehaviour score for this peer.
int64_t anonymous_namespace{net_processing.cpp}::CNodeState::nStallingSince |
Since when we're stalling block download progress (in microseconds), or 0.
int anonymous_namespace{net_processing.cpp}::CNodeState::nUnconnectingHeaders |
Length of current-streak of unconnecting headers announcements.
const CBlockIndex* anonymous_namespace{net_processing.cpp}::CNodeState::pindexBestHeaderSent |
The best header we have sent our peer.
const CBlockIndex* anonymous_namespace{net_processing.cpp}::CNodeState::pindexBestKnownBlock |
The best known block we know this peer has announced.
const CBlockIndex* anonymous_namespace{net_processing.cpp}::CNodeState::pindexLastCommonBlock |
The last full block we both have.
std::vector<CBlockReject> anonymous_namespace{net_processing.cpp}::CNodeState::rejects |
List of asynchronously-determined block rejections to notify this peer about.
std::list<QueuedBlock> anonymous_namespace{net_processing.cpp}::CNodeState::vBlocksInFlight |