mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
[Qt] ClientModel add method to get the height of the header chain
This commit is contained in:
parent
a001f18802
commit
e47052f6b5
2 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,14 @@ int ClientModel::getNumBlocks() const
|
||||||
return chainActive.Height();
|
return chainActive.Height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ClientModel::getHeaderHeight() const
|
||||||
|
{
|
||||||
|
LOCK(cs_main);
|
||||||
|
if (!pindexBestHeader)
|
||||||
|
return 0;
|
||||||
|
return pindexBestHeader->nHeight;
|
||||||
|
}
|
||||||
|
|
||||||
quint64 ClientModel::getTotalBytesRecv() const
|
quint64 ClientModel::getTotalBytesRecv() const
|
||||||
{
|
{
|
||||||
return CNode::GetTotalBytesRecv();
|
return CNode::GetTotalBytesRecv();
|
||||||
|
|
|
@ -51,6 +51,7 @@ public:
|
||||||
//! Return number of connections, default is in- and outbound (total)
|
//! Return number of connections, default is in- and outbound (total)
|
||||||
int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
|
int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
|
||||||
int getNumBlocks() const;
|
int getNumBlocks() const;
|
||||||
|
int getHeaderHeight() const;
|
||||||
|
|
||||||
//! Return number of transactions in the mempool
|
//! Return number of transactions in the mempool
|
||||||
long getMempoolSize() const;
|
long getMempoolSize() const;
|
||||||
|
|
Loading…
Reference in a new issue