network: add ttl to smsgEncrypt

This commit is contained in:
tecnovert
2025-08-22 15:15:25 +02:00
parent ed69a36d5d
commit ba8168938f
2 changed files with 2 additions and 2 deletions

View File

@@ -194,6 +194,7 @@ def encryptMsg(
payload,
timestamp,
deterministic,
msg_valid,
difficulty_target=difficulty_target,
)

View File

@@ -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