Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 5,016 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::AVAPOLL) { | ||||
for (unsigned int n = 0; n < nCount; n++) { | for (unsigned int n = 0; n < nCount; n++) { | ||||
CInv inv; | CInv inv; | ||||
vRecv >> inv; | vRecv >> inv; | ||||
// Default vote for unknown inv type | // Default vote for unknown inv type | ||||
uint32_t vote = -1; | uint32_t vote = -1; | ||||
// We don't vote definitively until we have an established quorum | // We only vote on proofs until we have an established quorum | ||||
if (!quorum_established) { | if (!quorum_established && inv.type != MSG_AVA_PROOF) { | ||||
votes.emplace_back(vote, inv.hash); | votes.emplace_back(vote, inv.hash); | ||||
continue; | continue; | ||||
} | } | ||||
// If inv's type is known, get a vote for its hash | // If inv's type is known, get a vote for its hash | ||||
switch (inv.type) { | switch (inv.type) { | ||||
case MSG_TX: { | case MSG_TX: { | ||||
vote = getAvalancheVoteForTx(m_mempool, TxId(inv.hash)); | vote = getAvalancheVoteForTx(m_mempool, TxId(inv.hash)); | ||||
▲ Show 20 Lines • Show All 2,083 Lines • Show Last 20 Lines |