mirror of
https://github.com/markqvist/LXMF.git
synced 2025-04-14 04:23:11 -04:00
Cleanup
This commit is contained in:
parent
7b4780cfb7
commit
c0a8f3be49
@ -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])
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user