Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 2,330 Lines • ▼ Show 20 Lines | else if (strCommand == NetMsgType::CMPCTBLOCK && !fImporting && !fReindex) { | ||||
UpdateBlockAvailability(pfrom->GetId(), pindex->GetBlockHash()); | UpdateBlockAvailability(pfrom->GetId(), pindex->GetBlockHash()); | ||||
std::map<uint256, | std::map<uint256, | ||||
std::pair<NodeId, std::list<QueuedBlock>::iterator>>:: | std::pair<NodeId, std::list<QueuedBlock>::iterator>>:: | ||||
iterator blockInFlightIt = | iterator blockInFlightIt = | ||||
mapBlocksInFlight.find(pindex->GetBlockHash()); | mapBlocksInFlight.find(pindex->GetBlockHash()); | ||||
bool fAlreadyInFlight = blockInFlightIt != mapBlocksInFlight.end(); | bool fAlreadyInFlight = blockInFlightIt != mapBlocksInFlight.end(); | ||||
if (pindex->nStatus & BLOCK_HAVE_DATA) { | if (pindex->nStatus & BLOCK_EXCESSIVE_OR_STORED_DATA) { | ||||
// Nothing to do here | // Nothing to do here | ||||
return true; | return true; | ||||
} | } | ||||
if (pindex->nChainWork <= | if (pindex->nChainWork <= | ||||
chainActive.Tip()->nChainWork || // We know something better | chainActive.Tip()->nChainWork || // We know something better | ||||
pindex->nTx != 0) { | pindex->nTx != 0) { | ||||
// We had this block at some point, but pruned it | // We had this block at some point, but pruned it | ||||
▲ Show 20 Lines • Show All 1,500 Lines • Show Last 20 Lines |