Bitcoin
|
Classes | |
struct | CBlockReject |
struct | CNodeState |
class | CompareInvMempoolOrder |
struct | IteratorComparator |
struct | QueuedBlock |
Typedefs | |
typedef std::map< uint256, CTransactionRef > | MapRelay |
Variables | |
limitedmap< uint256, int64_t > g_already_asked_for GUARDED_BY() | cs_main (MAX_INV_SZ) |
typedef std::map<uint256, CTransactionRef> anonymous_namespace{net_processing.cpp}::MapRelay |
Relay map
int64_t anonymous_namespace{net_processing.cpp}::CalculateTxGetDataTime | ( | const uint256 & | txid, |
int64_t | current_time, | ||
bool | use_inbound_delay | ||
) |
|
static |
void anonymous_namespace{net_processing.cpp}::EraseTxRequest | ( | const uint256 & | txid | ) |
|
static |
Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has at most count entries.
std::atomic<int64_t> anonymous_namespace{net_processing.cpp}::g_last_tip_update | ( | 0 | ) |
When our tip was last updated.
Number of nodes with fSyncStarted.
Sources of received blocks, saved to be able to send them reject messages or ban them when processing happens afterwards. Set mapBlockSource[hash].second to false if the node should not be punished if the block is invalid.
Filter for transactions that were recently rejected by AcceptToMemoryPool. These are not rerequested until the chain tip changes, at which point the entire filter is reset.
Without this filter we'd be re-requesting txs from each of our peers, increasing bandwidth consumption considerably. For instance, with 100 peers, half of which relay a tx we don't accept, that might be a 50x bandwidth increase. A flooding attacker attempting to roll-over the filter using minimum-sized, 60byte, transactions might manage to send 1000/sec if we have fast peers, so we pick 120,000 to give our peers a two minute window to send invs to us.
Decreasing the false positive rate is fairly cheap, so we pick one in a million to make it highly unlikely for users to have issues with this filter.
Memory used: 1.3 MB
Stack of nodes which we have set to announce using compact blocks
Number of preferable block download peers.
Number of peers from which we're downloading blocks.
Number of outbound peers with m_chain_sync.m_protect.
Expiration-time ordered list of (expire time, relay map entry) pairs.
Map maintaining per-node state.
static std::vector< std::pair< uint256, CTransactionRef > > vExtraTxnForCompact anonymous_namespace{net_processing.cpp}::GUARDED_BY | ( | g_cs_orphans | ) |
For random eviction.
|
static |
|
static |
|
static |
When a peer sends us a valid block, instruct it to announce blocks to us using CMPCTBLOCK if possible by adding its nodeid to the end of lNodesAnnouncingHeaderAndIDs, and keeping that list under a certain size by removing the first element if necessary.
|
static |
|
static |
Check whether the last unknown block a peer advertised is not yet known.
|
static |
void anonymous_namespace{net_processing.cpp}::RequestTx | ( | CNodeState * | state, |
const uint256 & | txid, | ||
int64_t | nNow | ||
) |
|
static |
|
static |
|
static |
Update tracking information about which blocks a peer is assumed to have.
|
static |
void anonymous_namespace{net_processing.cpp}::UpdateTxRequestTime | ( | const uint256 & | txid, |
int64_t | request_time | ||
) |
limitedmap<uint256, int64_t> g_already_asked_for GUARDED_BY() anonymous_namespace{net_processing.cpp}::cs_main(MAX_INV_SZ) |