@@ -128,6 +128,7 @@ def __init__(self, configdir = None, rnsconfigdir = None, daemon = False, force_
128128 self .notify_on_new_message = True
129129
130130 self .lxmf_max_propagation_size = None
131+ self .lxmf_max_sync_size = None
131132 self .lxmf_max_incoming_size = None
132133
133134 self .periodic_lxmf_sync = True
@@ -302,7 +303,7 @@ def __init__(self, configdir = None, rnsconfigdir = None, daemon = False, force_
302303
303304 self .message_router = LXMF .LXMRouter (
304305 identity = self .identity , storagepath = self .storagepath , autopeer = True ,
305- propagation_limit = self .lxmf_max_propagation_size , delivery_limit = self .lxmf_max_incoming_size ,
306+ propagation_limit = self .lxmf_max_propagation_size , sync_limit = self . lxmf_max_sync_size , delivery_limit = self .lxmf_max_incoming_size ,
306307 max_peers = self .max_peers , static_peers = static_peers ,
307308 )
308309
@@ -888,6 +889,14 @@ def applyConfig(self):
888889 value = 1
889890 self .lxmf_max_propagation_size = value
890891
892+ if not "max_sync_size" in self .config ["node" ]:
893+ self .lxmf_max_sync_size = 256 * 40
894+ else :
895+ value = self .config ["node" ].as_float ("max_sync_size" )
896+ if value < self .lxmf_max_propagation_size :
897+ value = self .lxmf_max_propagation_size
898+ self .lxmf_max_sync_size = value
899+
891900 if not "announce_at_start" in self .config ["node" ]:
892901 self .node_announce_at_start = False
893902 else :
@@ -1182,16 +1191,20 @@ def quit(self):
11821191# message_storage_limit = 2000
11831192
11841193# The maximum accepted transfer size per in-
1185- # coming propagation transfer, in kilobytes.
1186- # This also sets the upper limit for the size
1187- # of single messages accepted onto this node.
1194+ # coming propagation message, in kilobytes.
1195+ # This sets the upper limit for the size of
1196+ # single messages accepted onto this node.
1197+ max_transfer_size = 256
1198+
1199+ # The maximum accepted transfer size per in-
1200+ # coming propagation node sync.
11881201#
11891202# If a node wants to propagate a larger number
11901203# of messages to this node, than what can fit
11911204# within this limit, it will prioritise sending
1192- # the smallest, newest messages first, and try
1205+ # the smallest messages first, and try again
11931206# with any remaining messages at a later point.
1194- max_transfer_size = 256
1207+ max_sync_size = 10240
11951208
11961209# You can tell the LXMF message router to
11971210# prioritise storage for one or more
0 commit comments