| 70 | } |
| 71 | |
| 72 | int ClientModel::getHeaderTipHeight() const |
| 73 | { |
| 74 | if (cachedBestHeaderHeight == -1) { |
| 75 | // make sure we initially populate the cache via a cs_main lock |
| 76 | // otherwise we need to wait for a tip update |
| 77 | int height; |
| 78 | int64_t blockTime; |
| 79 | if (m_node.getHeaderTip(height, blockTime)) { |
| 80 | cachedBestHeaderHeight = height; |
| 81 | cachedBestHeaderTime = blockTime; |
| 82 | } |
| 83 | } |
| 84 | return cachedBestHeaderHeight; |
| 85 | } |
| 86 | |
| 87 | int64_t ClientModel::getHeaderTipTime() const |
| 88 | { |
no test coverage detected