mirror of
https://github.com/markqvist/LXMF.git
synced 2025-07-28 09:34:20 -04:00
Cleanup
This commit is contained in:
parent
7b4780cfb7
commit
c0a8f3be49
2 changed files with 9 additions and 6 deletions
|
@ -47,10 +47,12 @@ class LXMFPropagationAnnounceHandler:
|
||||||
propagation_transfer_limit = None
|
propagation_transfer_limit = None
|
||||||
wanted_inbound_peers = None
|
wanted_inbound_peers = None
|
||||||
if len(data) >= 4:
|
if len(data) >= 4:
|
||||||
try:
|
# TODO: Rethink, probably not necessary anymore
|
||||||
wanted_inbound_peers = int(data[3])
|
# try:
|
||||||
except:
|
# wanted_inbound_peers = int(data[3])
|
||||||
wanted_inbound_peers = None
|
# except:
|
||||||
|
# wanted_inbound_peers = None
|
||||||
|
|
||||||
if len(data) >= 3:
|
if len(data) >= 3:
|
||||||
try:
|
try:
|
||||||
propagation_transfer_limit = float(data[2])
|
propagation_transfer_limit = float(data[2])
|
||||||
|
|
|
@ -286,7 +286,7 @@ class LXMRouter:
|
||||||
node_state, # Boolean flag signalling propagation node state
|
node_state, # Boolean flag signalling propagation node state
|
||||||
int(time.time()), # Current node timebase
|
int(time.time()), # Current node timebase
|
||||||
self.propagation_per_transfer_limit, # Per-transfer limit for message propagation in kilobytes
|
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)
|
data = msgpack.packb(announce_data)
|
||||||
|
@ -895,7 +895,8 @@ class LXMRouter:
|
||||||
threading.Thread(target=self.save_outbound_stamp_costs, daemon=True).start()
|
threading.Thread(target=self.save_outbound_stamp_costs, daemon=True).start()
|
||||||
|
|
||||||
def get_wanted_inbound_peers(self):
|
def get_wanted_inbound_peers(self):
|
||||||
# TODO: Implement
|
# TODO: Implement/rethink.
|
||||||
|
# Probably not necessary anymore.
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_announce_app_data(self, destination_hash):
|
def get_announce_app_data(self, destination_hash):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue