Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 3,674 Lines • ▼ Show 20 Lines | if (strCommand == NetMsgType::AVARESPONSE && !fImporting && !fReindex && | ||||
if (updates.size()) { | if (updates.size()) { | ||||
for (avalanche::BlockUpdate &u : updates) { | for (avalanche::BlockUpdate &u : updates) { | ||||
CBlockIndex *pindex = u.getBlockIndex(); | CBlockIndex *pindex = u.getBlockIndex(); | ||||
switch (u.getStatus()) { | switch (u.getStatus()) { | ||||
case avalanche::BlockUpdate::Status::Invalid: | case avalanche::BlockUpdate::Status::Invalid: | ||||
case avalanche::BlockUpdate::Status::Rejected: { | case avalanche::BlockUpdate::Status::Rejected: { | ||||
BlockValidationState state; | BlockValidationState state; | ||||
ParkBlock(config, state, pindex); | ::ChainstateActive().ParkBlock(config, state, pindex); | ||||
if (!state.IsValid()) { | if (!state.IsValid()) { | ||||
return error("Database error: %s", | return error("Database error: %s", | ||||
state.GetRejectReason()); | state.GetRejectReason()); | ||||
} | } | ||||
} break; | } break; | ||||
case avalanche::BlockUpdate::Status::Accepted: | case avalanche::BlockUpdate::Status::Accepted: | ||||
case avalanche::BlockUpdate::Status::Finalized: { | case avalanche::BlockUpdate::Status::Finalized: { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
▲ Show 20 Lines • Show All 1,417 Lines • Show Last 20 Lines |