MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / EXCLUSIVE_LOCKS_REQUIRED

Function EXCLUSIVE_LOCKS_REQUIRED

src/net_processing.cpp:1363–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1361}
1362
1363static bool PeerHasHeader(CNodeState *state, const CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
1364{
1365 if (state->pindexBestKnownBlock && pindex == state->pindexBestKnownBlock->GetAncestor(pindex->nHeight))
1366 return true;
1367 if (state->pindexBestHeaderSent && pindex == state->pindexBestHeaderSent->GetAncestor(pindex->nHeight))
1368 return true;
1369 return false;
1370}
1371
1372void PeerManagerImpl::ProcessBlockAvailability(NodeId nodeid) {
1373 CNodeState *state = State(nodeid);

Callers 4

NewPoWValidBlockMethod · 0.70
MaybeSendAddrMethod · 0.70

Calls 1

GetAncestorMethod · 0.45

Tested by

no test coverage detected