mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-11-23 08:20:51 -05:00
Propagation node stamp cost handling
This commit is contained in:
parent
3fedd0af30
commit
0baebe5a3c
1 changed files with 11 additions and 5 deletions
|
|
@ -1844,16 +1844,22 @@ class LXMFPeerEntry(urwid.WidgetWrap):
|
||||||
focus_style = "list_focus_unresponsive"
|
focus_style = "list_focus_unresponsive"
|
||||||
|
|
||||||
if peer.propagation_transfer_limit: txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
if peer.propagation_transfer_limit: txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
||||||
else: txfer_limit = "No"
|
else: txfer_limit = "No"
|
||||||
|
|
||||||
if peer.propagation_sync_limit: sync_limit = RNS.prettysize(peer.propagation_sync_limit*1000)
|
if peer.propagation_sync_limit: sync_limit = RNS.prettysize(peer.propagation_sync_limit*1000)
|
||||||
else: sync_limit = "Unknown"
|
else: sync_limit = "Unknown"
|
||||||
|
|
||||||
|
if peer.propagation_stamp_cost: sct = peer.propagation_stamp_cost
|
||||||
|
else: sct = "Unknown"
|
||||||
|
|
||||||
|
if peer.propagation_stamp_cost_flexibility: scf = f" (flex {peer.propagation_stamp_cost_flexibility})"
|
||||||
|
else: scf = ""
|
||||||
|
|
||||||
ar = round(peer.acceptance_rate*100, 2)
|
ar = round(peer.acceptance_rate*100, 2)
|
||||||
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
|
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
|
||||||
peer_info_str += f"\n {sync_limit} sync limit, {txfer_limit} msg limit\n"
|
peer_info_str += f"\n {sync_limit} sync limit, {txfer_limit} msg limit"
|
||||||
peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
|
peer_info_str += f"\n {RNS.prettyspeed(peer.sync_transfer_rate)} STR, {RNS.prettyspeed(peer.link_establishment_rate)} LER"
|
||||||
peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER"
|
peer_info_str += f"\n {sct} propagation cost{scf}"
|
||||||
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {ar}% AR"
|
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {ar}% AR"
|
||||||
widget = ListEntry(peer_info_str)
|
widget = ListEntry(peer_info_str)
|
||||||
self.display_widget = urwid.AttrMap(widget, style, focus_style)
|
self.display_widget = urwid.AttrMap(widget, style, focus_style)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue