qml network: restrict cases where server is shown "lagging"
This commit is contained in:
@@ -69,11 +69,11 @@ Pane {
|
||||
Label {
|
||||
text: qsTr('Server Height:');
|
||||
color: Material.accentColor
|
||||
visible: Network.serverHeight != Network.height
|
||||
visible: Network.serverHeight != 0 && Network.serverHeight < Network.height
|
||||
}
|
||||
Label {
|
||||
text: Network.serverHeight + " (lagging)"
|
||||
visible: Network.serverHeight != Network.height
|
||||
visible: Network.serverHeight != 0 && Network.serverHeight < Network.height
|
||||
}
|
||||
Heading {
|
||||
Layout.columnSpan: 2
|
||||
|
||||
@@ -1218,7 +1218,7 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):
|
||||
interface = self.interface
|
||||
return interface.tip if interface else 0
|
||||
|
||||
def get_local_height(self):
|
||||
def get_local_height(self) -> int:
|
||||
"""Length of header chain, POW-verified.
|
||||
In case of a chain split, this is for the branch the main interface is on,
|
||||
but it is the tip of that branch (even if main interface is behind).
|
||||
|
||||
Reference in New Issue
Block a user