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