| 78 | } |
| 79 | |
| 80 | const 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 | |
| 91 | CBlockIndex* CChain::FindEarliestAtLeast(int64_t nTime, int height) const |
| 92 | { |
no test coverage detected