Added ability to specify delivery destination stamp value at identity registration

This commit is contained in:
Mark Qvist committed 2026-11-17 16:35:03 +01:00
1 parent fbcb642450
commit 442dda37ec
3 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -410,7 +410,7 @@ class LXMRouter:
da_thread.setDaemon(True)
da_thread.start()
def register_delivery_identity(self, identity, display_name = None, stamp_cost = None):
def register_delivery_identity(self, identity, display_name=None, stamp_cost=None, stamp_value=None):
if len(self.delivery_destinations) != 0:
RNS.log("Currently only one delivery identity is supported per LXMF router instance", RNS.LOG_ERROR)
return None
@@ -419,6 +419,7 @@ class LXMRouter:
os.makedirs(self.ratchetpath)
delivery_destination = RNS.Destination(identity, RNS.Destination.IN, RNS.Destination.SINGLE, APP_NAME, "delivery")
if stamp_value: delivery_destination.set_value(stamp_value)
delivery_destination.set_link_cost(self.DELIVERY_LINK_COST)
delivery_destination.enable_ratchets(f"{self.ratchetpath}/{RNS.hexrep(delivery_destination.hash, delimit=False)}.ratchets")
delivery_destination.set_packet_callback(self.delivery_packet)
+1 -1
View File
@@ -1 +1 @@
__version__ = "1.3.0"
__version__ = "1.3.1"
+1 -1
View File
@@ -31,6 +31,6 @@ setuptools.setup(
'lxmd=LXMF.Utilities.lxmd:main',
]
},
install_requires=["rns>=1.6.0"],
install_requires=["rns>=1.6.1"],
python_requires=">=3.7",
)