mirror of
https://github.com/markqvist/LXMF.git
synced 2025-02-23 16:39:47 -05:00
Set transfer limit on reverse auto-peer
This commit is contained in:
parent
e69da2ed2a
commit
68257a441f
@ -1839,7 +1839,12 @@ class LXMRouter:
|
|||||||
|
|
||||||
if not remote_hash in self.peers:
|
if not remote_hash in self.peers:
|
||||||
if self.autopeer and RNS.Transport.hops_to(remote_hash) <= self.autopeer_maxdepth:
|
if self.autopeer and RNS.Transport.hops_to(remote_hash) <= self.autopeer_maxdepth:
|
||||||
self.peer(remote_hash, remote_timebase)
|
# TODO: Query cache for an announce and get propagation
|
||||||
|
# transfer limit from that. For now, initialise it to a
|
||||||
|
# sane default value, and wait for an announce to arrive
|
||||||
|
# that will update the peering config to the actual limit.
|
||||||
|
propagation_transfer_limit = LXMRouter.PROPAGATION_LIMIT//4
|
||||||
|
self.peer(remote_hash, remote_timebase, propagation_transfer_limit)
|
||||||
else:
|
else:
|
||||||
remote_str = f"peer {remote_str}"
|
remote_str = f"peer {remote_str}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user