Added transfer limit awareness to message sync. Added ability to retain messages on node.

This commit is contained in:
Mark Qvist 2024-03-02 09:09:51 +01:00
commit 1d651a9b53
2 changed files with 32 additions and 7 deletions

View file

@ -169,7 +169,8 @@ class LXMPeer:
transient_id = unhandled_entry[0]
weight = unhandled_entry[1]
lxm_size = unhandled_entry[2]
if self.propagation_transfer_limit != None and cumulative_size + lxm_size > (self.propagation_transfer_limit*1000):
next_size = cumulative_size + (lxm_size+per_message_overhead)
if self.propagation_transfer_limit != None and next_size > (self.propagation_transfer_limit*1000):
pass
else:
cumulative_size += (lxm_size+per_message_overhead)