Skip to content

Commit 46eee79

Browse files
committed
Added sync transfer rate to PN list display
1 parent bd909c9 commit 46eee79

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

nomadnet/ui/textui/Network.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,15 @@ def __init__(self, app, peer, delegate, trust_level):
17971797
style = "list_unresponsive"
17981798
focus_style = "list_focus_unresponsive"
17991799

1800-
widget = ListEntry(sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))+"\n "+str(len(peer.unhandled_messages))+" unhandled LXMs, "+RNS.prettysize(peer.link_establishment_rate/8, "b")+"/s LER")
1800+
if peer.propagation_transfer_limit:
1801+
txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
1802+
else:
1803+
txfer_limit = "No"
1804+
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
1805+
peer_info_str += "\n "+str(len(peer.unhandled_messages))+f" unhandled LXMs, {txfer_limit} sync limit\n"
1806+
peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
1807+
peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER\n"
1808+
widget = ListEntry(peer_info_str)
18011809
self.display_widget = urwid.AttrMap(widget, style, focus_style)
18021810
self.display_widget.destination_hash = destination_hash
18031811
super().__init__(self.display_widget)

0 commit comments

Comments
 (0)