Returns the index entry at a particular height in this chain, or nullptr if no such height exists. */
| 589 | |
| 590 | /** Returns the index entry at a particular height in this chain, or nullptr if no such height exists. */ |
| 591 | CBlockIndex* operator[](int nHeight) const |
| 592 | { |
| 593 | if (nHeight < 0 || nHeight >= (int)vChain.size()) |
| 594 | return nullptr; |
| 595 | return vChain[nHeight]; |
| 596 | } |
| 597 | |
| 598 | /** Efficiently check whether a block is present in this chain. */ |
| 599 | bool Contains(const CBlockIndex* pindex) const |