mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-11-30 11:56:23 -05:00
Added ability to configure LXMF destination stamp value
This commit is contained in:
parent
c47f9e4d97
commit
415559f731
2 changed files with 25 additions and 1 deletions
|
|
@ -150,6 +150,7 @@ class NomadNetworkApp:
|
|||
self.notify_on_new_message = True
|
||||
self.compose_markdown = True
|
||||
|
||||
self.lxmf_stamp_value = None
|
||||
self.lxmf_max_propagation_size = None
|
||||
self.lxmf_max_sync_size = None
|
||||
self.lxmf_max_incoming_size = None
|
||||
|
|
@ -389,7 +390,7 @@ class NomadNetworkApp:
|
|||
for destination_hash in self.ignored_list:
|
||||
self.message_router.ignore_destination(destination_hash)
|
||||
|
||||
self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost)
|
||||
self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost, stamp_value=self.lxmf_stamp_value)
|
||||
if not self.accept_invalid_stamps:
|
||||
self.message_router.enforce_stamps()
|
||||
|
||||
|
|
@ -870,6 +871,11 @@ class NomadNetworkApp:
|
|||
value = self.config["client"].as_bool(option)
|
||||
self.enable_client = value
|
||||
|
||||
if option == "stamp_value":
|
||||
value = self.config["client"].as_float("stamp_value")
|
||||
if value < 1: value = 1
|
||||
self.lxmf_stamp_value = RNS.Stamps.quantize_cost(value)
|
||||
|
||||
if option == "downloads_path":
|
||||
value = self.config["client"]["downloads_path"]
|
||||
self.downloads_path = os.path.expanduser(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue