1
0

send server height and server lag with daemon

This commit is contained in:
ThomasV
2014-07-25 16:32:19 +02:00
parent 96070246b7
commit af3fd62fd4
5 changed files with 32 additions and 25 deletions

View File

@@ -467,12 +467,13 @@ class ElectrumWindow(QMainWindow):
icon = QIcon(":icons/status_disconnected.png")
elif self.network.is_connected():
server_lag = self.network.get_local_height() - self.network.get_server_height()
if not self.wallet.up_to_date:
text = _("Synchronizing...")
icon = QIcon(":icons/status_waiting.png")
#elif self.network.server_lag > 1:
# text = _("Server is lagging (%d blocks)"%self.network.server_lag)
# icon = QIcon(":icons/status_lagging.png")
elif server_lag > 1:
text = _("Server is lagging (%d blocks)"%server_lag)
icon = QIcon(":icons/status_lagging.png")
else:
c, u = self.wallet.get_account_balance(self.current_account)
text = _( "Balance" ) + ": %s "%( self.format_amount(c) ) + self.base_unit()