| 90 | } |
| 91 | |
| 92 | int ClientModel::getHeaderTipHeight() const |
| 93 | { |
| 94 | if (cachedBestHeaderHeight == -1) { |
| 95 | // make sure we initially populate the cache via a cs_main lock |
| 96 | // otherwise we need to wait for a tip update |
| 97 | int height; |
| 98 | int64_t blockTime; |
| 99 | if (m_node.getHeaderTip(height, blockTime)) { |
| 100 | cachedBestHeaderHeight = height; |
| 101 | cachedBestHeaderTime = blockTime; |
| 102 | } |
| 103 | } |
| 104 | return cachedBestHeaderHeight; |
| 105 | } |
| 106 | |
| 107 | int64_t ClientModel::getHeaderTipTime() const |
| 108 | { |
no test coverage detected