Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 4,386 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::AVARESPONSE) { | ||||
Misbehaving(pfrom, banscore, error); | Misbehaving(pfrom, banscore, error); | ||||
return; | return; | ||||
} | } | ||||
pfrom.m_avalanche_state->invsVoted(response.GetVotes().size()); | pfrom.m_avalanche_state->invsVoted(response.GetVotes().size()); | ||||
if (updates.size()) { | if (updates.size()) { | ||||
for (avalanche::BlockUpdate &u : updates) { | for (avalanche::BlockUpdate &u : updates) { | ||||
CBlockIndex *pindex = u.getBlockIndex(); | CBlockIndex *pindex = u.getVoteItem(); | ||||
switch (u.getStatus()) { | switch (u.getStatus()) { | ||||
case avalanche::VoteStatus::Invalid: | case avalanche::VoteStatus::Invalid: | ||||
case avalanche::VoteStatus::Rejected: { | case avalanche::VoteStatus::Rejected: { | ||||
LogPrintf("Avalanche rejected %s, parking\n", | LogPrintf("Avalanche rejected %s, parking\n", | ||||
pindex->GetBlockHash().GetHex()); | pindex->GetBlockHash().GetHex()); | ||||
BlockValidationState state; | BlockValidationState state; | ||||
::ChainstateActive().ParkBlock(config, state, pindex); | ::ChainstateActive().ParkBlock(config, state, pindex); | ||||
if (!state.IsValid()) { | if (!state.IsValid()) { | ||||
▲ Show 20 Lines • Show All 1,555 Lines • Show Last 20 Lines |