mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-19 11:31:07 +00:00
only update cached values in ClientModel::updateTimer() when they are changed
This commit is contained in:
parent
8ce7915aad
commit
75578d60f3
@ -60,10 +60,12 @@ void ClientModel::updateTimer()
|
|||||||
int newNumBlocksOfPeers = getNumBlocksOfPeers();
|
int newNumBlocksOfPeers = getNumBlocksOfPeers();
|
||||||
|
|
||||||
if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers)
|
if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers)
|
||||||
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
|
{
|
||||||
|
|
||||||
cachedNumBlocks = newNumBlocks;
|
cachedNumBlocks = newNumBlocks;
|
||||||
cachedNumBlocksOfPeers = newNumBlocksOfPeers;
|
cachedNumBlocksOfPeers = newNumBlocksOfPeers;
|
||||||
|
|
||||||
|
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientModel::updateNumConnections(int numConnections)
|
void ClientModel::updateNumConnections(int numConnections)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user