mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-11-19 14:36:28 -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)
|
||||
|
|
|
|||
|
|
@ -1018,6 +1018,12 @@ The number of minutes between each automatic sync. The default is equal to 6 hou
|
|||
On low-bandwidth networks, it can be useful to limit the amount of messages downloaded in each sync. The default is 8. Set to 0 to download all available messages every time a sync occurs.
|
||||
<
|
||||
|
||||
>>>
|
||||
`!stamp_value = 25.0`!
|
||||
>>>>
|
||||
The target stamp value for your LXMF destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though.
|
||||
<
|
||||
|
||||
>>>
|
||||
`!required_stamp_cost = None`!
|
||||
>>>>
|
||||
|
|
@ -1215,6 +1221,18 @@ Determines whether the node server should be started on launch. Must be a boolea
|
|||
Defines what the announced name of the node should be.
|
||||
<
|
||||
|
||||
>>>
|
||||
`!stamp_value = 25.0`!
|
||||
>>>>
|
||||
The target stamp value for your node destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though.
|
||||
<
|
||||
|
||||
>>>
|
||||
`!link_cost = 17.8`!
|
||||
>>>>
|
||||
The link stamp cost required for other peers to connect to your node. The default is a relatively high value, that should deter most automated scraping and misuse, but you can set it even higher, if you wish, or lower it to allow connecting more easily.
|
||||
<
|
||||
|
||||
>>>
|
||||
`!announce_at_start = yes`!
|
||||
>>>>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue