MCPcopy Create free account
hub / github.com/ElementsProject/elements / getHeaderTipHeight

Method getHeaderTipHeight

src/qt/clientmodel.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92int 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
107int64_t ClientModel::getHeaderTipTime() const
108{

Callers 1

Calls 1

getHeaderTipMethod · 0.80

Tested by

no test coverage detected