From fedb7c23d0435dbf9d600357f7894cdbf3b719ee Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 25 Mar 2019 16:25:49 -0400 Subject: [PATCH] bring back blocks_behind in wallet status --- lbrynet/extras/daemon/Components.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/extras/daemon/Components.py b/lbrynet/extras/daemon/Components.py index 2bd7855d9..95a2eade9 100644 --- a/lbrynet/extras/daemon/Components.py +++ b/lbrynet/extras/daemon/Components.py @@ -252,9 +252,11 @@ class WalletComponent(Component): async def get_status(self): if self.wallet_manager and self.running: local_height = self.wallet_manager.ledger.headers.height + remote_height = await self.wallet_manager.ledger.network.get_server_height() best_hash = self.wallet_manager.get_best_blockhash() return { 'blocks': max(local_height, 0), + 'blocks_behind': max(remote_height - local_height, 0), 'best_blockhash': best_hash, 'is_encrypted': self.wallet_manager.use_encryption, 'is_locked': not self.wallet_manager.is_wallet_unlocked,