This commit is contained in:
Mark Qvist 2025-01-30 15:04:21 +01:00
parent 7b4780cfb7
commit c0a8f3be49
2 changed files with 9 additions and 6 deletions

View File

@ -47,10 +47,12 @@ class LXMFPropagationAnnounceHandler:
propagation_transfer_limit = None
wanted_inbound_peers = None
if len(data) >= 4:
try:
wanted_inbound_peers = int(data[3])
except:
wanted_inbound_peers = None
# TODO: Rethink, probably not necessary anymore
# try:
# wanted_inbound_peers = int(data[3])
# except:
# wanted_inbound_peers = None
if len(data) >= 3:
try:
propagation_transfer_limit = float(data[2])

View File

@ -286,7 +286,7 @@ class LXMRouter:
node_state, # Boolean flag signalling propagation node state
int(time.time()), # Current node timebase
self.propagation_per_transfer_limit, # Per-transfer limit for message propagation in kilobytes
self.get_wanted_inbound_peers(), # How many more inbound peers this node wants
None, # How many more inbound peers this node wants
]
data = msgpack.packb(announce_data)
@ -895,7 +895,8 @@ class LXMRouter:
threading.Thread(target=self.save_outbound_stamp_costs, daemon=True).start()
def get_wanted_inbound_peers(self):
# TODO: Implement
# TODO: Implement/rethink.
# Probably not necessary anymore.
return None
def get_announce_app_data(self, destination_hash):