MCPcopy Create free account
hub / github.com/ElementsProject/elements / FindFork

Method FindFork

src/chain.cpp:80–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
81 if (pindex == nullptr) {
82 return nullptr;
83 }
84 if (pindex->nHeight > Height())
85 pindex = pindex->GetAncestor(Height());
86 while (pindex && !Contains(pindex))
87 pindex = pindex->pprev;
88 return pindex;
89}
90
91CBlockIndex* CChain::FindEarliestAtLeast(int64_t nTime, int height) const
92{

Callers 5

ActivateBestChainStepMethod · 0.80
ActivateBestChainMethod · 0.80
InitMethod · 0.80
EXCLUSIVE_LOCKS_REQUIREDFunction · 0.80
getchaintipsFunction · 0.80

Calls 1

GetAncestorMethod · 0.80

Tested by

no test coverage detected