mirror of
https://github.com/markqvist/LXMF.git
synced 2025-05-21 23:40:27 -04:00
Implemented ticket exchanges. Implemented stamp generation and validation by tickets.
This commit is contained in:
parent
74cbd11473
commit
62f5a9eead
4 changed files with 251 additions and 35 deletions
|
@ -6,6 +6,7 @@ required_stamp_cost = 8
|
|||
enforce_stamps = False
|
||||
|
||||
def delivery_callback(message):
|
||||
global my_lxmf_destination, router
|
||||
time_string = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(message.timestamp))
|
||||
signature_string = "Signature is invalid, reason undetermined"
|
||||
if message.signature_validated:
|
||||
|
@ -35,6 +36,12 @@ def delivery_callback(message):
|
|||
RNS.log("\t| Stamp : "+stamp_string)
|
||||
RNS.log("\t+---------------------------------------------------------------")
|
||||
|
||||
# Optionally, send a reply
|
||||
# source = my_lxmf_destination
|
||||
# dest = message.source
|
||||
# lxm = LXMF.LXMessage(dest, source, "Reply", None, desired_method=LXMF.LXMessage.DIRECT, include_ticket=True)
|
||||
# router.handle_outbound(lxm)
|
||||
|
||||
r = RNS.Reticulum()
|
||||
|
||||
router = LXMF.LXMRouter(storagepath="./tmp1", enforce_stamps=enforce_stamps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue