mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
[Qt] only update "amount of blocks left" when the header chain is in-sync
This commit is contained in:
@@ -68,7 +68,7 @@ int ClientModel::getNumBlocks() const
|
||||
return chainActive.Height();
|
||||
}
|
||||
|
||||
int ClientModel::getHeaderHeight() const
|
||||
int ClientModel::getHeaderTipHeight() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (!pindexBestHeader)
|
||||
@@ -76,6 +76,14 @@ int ClientModel::getHeaderHeight() const
|
||||
return pindexBestHeader->nHeight;
|
||||
}
|
||||
|
||||
int64_t ClientModel::getHeaderTipTime() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (!pindexBestHeader)
|
||||
return 0;
|
||||
return pindexBestHeader->GetBlockTime();
|
||||
}
|
||||
|
||||
quint64 ClientModel::getTotalBytesRecv() const
|
||||
{
|
||||
return CNode::GetTotalBytesRecv();
|
||||
|
||||
Reference in New Issue
Block a user