mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 21:04:58 +02:00
[Qt] ClientModel add method to get the height of the header chain
This commit is contained in:
@@ -68,6 +68,14 @@ int ClientModel::getNumBlocks() const
|
||||
return chainActive.Height();
|
||||
}
|
||||
|
||||
int ClientModel::getHeaderHeight() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (!pindexBestHeader)
|
||||
return 0;
|
||||
return pindexBestHeader->nHeight;
|
||||
}
|
||||
|
||||
quint64 ClientModel::getTotalBytesRecv() const
|
||||
{
|
||||
return CNode::GetTotalBytesRecv();
|
||||
|
||||
Reference in New Issue
Block a user