| 1361 | } |
| 1362 | |
| 1363 | static 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 | |
| 1372 | void PeerManagerImpl::ProcessBlockAvailability(NodeId nodeid) { |
| 1373 | CNodeState *state = State(nodeid); |
no test coverage detected