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

Method CheckHeadersAreContinuous

src/net_processing.cpp:2701–2711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2699}
2700
2701bool PeerManagerImpl::CheckHeadersAreContinuous(const std::vector<CBlockHeader>& headers) const
2702{
2703 uint256 hashLastBlock;
2704 for (const CBlockHeader& header : headers) {
2705 if (!hashLastBlock.IsNull() && header.hashPrevBlock != hashLastBlock) {
2706 return false;
2707 }
2708 hashLastBlock = header.GetHash();
2709 }
2710 return true;
2711}
2712
2713bool PeerManagerImpl::IsContinuationOfLowWorkHeadersSync(Peer& peer, CNode& pfrom, std::vector<CBlockHeader>& headers)
2714{

Callers

nothing calls this directly

Calls 2

IsNullMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected