mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
network dialog: display branch size
This commit is contained in:
parent
50ad656c87
commit
5834b391ea
1 changed files with 2 additions and 0 deletions
|
@ -362,10 +362,12 @@ class NetworkChoiceLayout(object):
|
||||||
status = _("Connected to %d nodes.")%n if n else _("Not connected")
|
status = _("Connected to %d nodes.")%n if n else _("Not connected")
|
||||||
self.status_label.setText(status)
|
self.status_label.setText(status)
|
||||||
if len(self.network.blockchains)>1:
|
if len(self.network.blockchains)>1:
|
||||||
|
chain = self.network.blockchain()
|
||||||
checkpoint = self.network.get_checkpoint()
|
checkpoint = self.network.get_checkpoint()
|
||||||
name = self.network.get_blockchain_name(self.network.blockchain())
|
name = self.network.get_blockchain_name(self.network.blockchain())
|
||||||
msg = _('Chain split detected at block %d')%checkpoint + '\n'
|
msg = _('Chain split detected at block %d')%checkpoint + '\n'
|
||||||
msg += (_('You are following branch') if auto_connect else _('Your server is on branch'))+ ' ' + name
|
msg += (_('You are following branch') if auto_connect else _('Your server is on branch'))+ ' ' + name
|
||||||
|
msg += ' (%d %s)' % (chain.get_branch_size(), _('blocks'))
|
||||||
else:
|
else:
|
||||||
msg = ''
|
msg = ''
|
||||||
self.split_label.setText(msg)
|
self.split_label.setText(msg)
|
||||||
|
|
Loading…
Add table
Reference in a new issue