Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 1,303 Lines • ▼ Show 20 Lines | connman->ForEachNode([this, &pcmpctblock, pindex, &msgMaker, | ||||
return; | return; | ||||
} | } | ||||
ProcessBlockAvailability(pnode->GetId()); | ProcessBlockAvailability(pnode->GetId()); | ||||
CNodeState &state = *State(pnode->GetId()); | CNodeState &state = *State(pnode->GetId()); | ||||
// If the peer has, or we announced to them the previous block already, | // If the peer has, or we announced to them the previous block already, | ||||
// but we don't think they have this one, go ahead and announce it. | // but we don't think they have this one, go ahead and announce it. | ||||
if (state.fPreferHeaderAndIDs && !PeerHasHeader(&state, pindex) && | if (state.fPreferHeaderAndIDs && !PeerHasHeader(&state, pindex) && | ||||
PeerHasHeader(&state, pindex->pprev)) { | PeerHasHeader(&state, pindex->pprev)) { | ||||
LogPrint(BCLog::NET, "%s sending header-and-ids %s to peer=%d\n", | LogPrint(BCLog::NET, "%s sending header-and-ids %s to peer=%d\n", | ||||
"PeerLogicValidation::NewPoWValidBlock", | "PeerLogicValidation::NewPoWValidBlock", | ||||
hashBlock.ToString(), pnode->GetId()); | hashBlock.ToString(), pnode->GetId()); | ||||
connman->PushMessage( | connman->PushMessage( | ||||
pnode, msgMaker.Make(NetMsgType::CMPCTBLOCK, *pcmpctblock)); | pnode, msgMaker.Make(NetMsgType::CMPCTBLOCK, *pcmpctblock)); | ||||
state.pindexBestHeaderSent = pindex; | state.pindexBestHeaderSent = pindex; | ||||
} | } | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 3,440 Lines • Show Last 20 Lines |