MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / FindFork

Method FindFork

src/chain.cpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
52 if (pindex == nullptr) {
53 return nullptr;
54 }
55 if (pindex->nHeight > Height())
56 pindex = pindex->GetAncestor(Height());
57 while (pindex && !Contains(pindex))
58 pindex = pindex->pprev;
59 return pindex;
60}
61
62CBlockIndex* CChain::FindEarliestAtLeast(int64_t nTime) const
63{

Callers 6

ActivateBestChainStepMethod · 0.80
ActivateBestChainMethod · 0.80
listsinceblockFunction · 0.80
NextSyncBlockFunction · 0.80
getchaintipsFunction · 0.80

Calls 1

GetAncestorMethod · 0.80

Tested by

no test coverage detected