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