From ba8168938fc4a82ed119c68f65217cfc6cd91b06 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Fri, 22 Aug 2025 15:15:25 +0200 Subject: [PATCH] network: add ttl to smsgEncrypt --- basicswap/network/simplex.py | 1 + basicswap/util/smsg.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basicswap/network/simplex.py b/basicswap/network/simplex.py index 6972c15..a40f484 100644 --- a/basicswap/network/simplex.py +++ b/basicswap/network/simplex.py @@ -194,6 +194,7 @@ def encryptMsg( payload, timestamp, deterministic, + msg_valid, difficulty_target=difficulty_target, ) diff --git a/basicswap/util/smsg.py b/basicswap/util/smsg.py index ca4e001..ccfc1d0 100644 --- a/basicswap/util/smsg.py +++ b/basicswap/util/smsg.py @@ -95,6 +95,7 @@ def smsgEncrypt( smsg_timestamp: int = None, deterministic: bool = False, payload_format: int = 2, + smsg_ttl: int = SMSG_MIN_TTL, difficulty_target=0x1EFFFFFF, ) -> bytes: # assert len(payload) < 128 # Requires lz4 if payload > 128 bytes @@ -159,8 +160,6 @@ def smsgEncrypt( smsg_version = bytes((2, 1)) smsg_flags = bytes((0,)) - smsg_ttl = SMSG_MIN_TTL - assert len(R) == 33 assert len(mac) == 32