MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / getHeaderTipHeight

Method getHeaderTipHeight

src/qt/clientmodel.cpp:72–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72int 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
87int64_t ClientModel::getHeaderTipTime() const
88{

Callers 2

setClientModelMethod · 0.80

Calls 1

getHeaderTipMethod · 0.80

Tested by

no test coverage detected