mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
network: add ttl to smsgEncrypt
This commit is contained in:
@@ -194,6 +194,7 @@ def encryptMsg(
|
||||
payload,
|
||||
timestamp,
|
||||
deterministic,
|
||||
msg_valid,
|
||||
difficulty_target=difficulty_target,
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user