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,
|
payload,
|
||||||
timestamp,
|
timestamp,
|
||||||
deterministic,
|
deterministic,
|
||||||
|
msg_valid,
|
||||||
difficulty_target=difficulty_target,
|
difficulty_target=difficulty_target,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ def smsgEncrypt(
|
|||||||
smsg_timestamp: int = None,
|
smsg_timestamp: int = None,
|
||||||
deterministic: bool = False,
|
deterministic: bool = False,
|
||||||
payload_format: int = 2,
|
payload_format: int = 2,
|
||||||
|
smsg_ttl: int = SMSG_MIN_TTL,
|
||||||
difficulty_target=0x1EFFFFFF,
|
difficulty_target=0x1EFFFFFF,
|
||||||
) -> bytes:
|
) -> bytes:
|
||||||
# assert len(payload) < 128 # Requires lz4 if payload > 128 bytes
|
# assert len(payload) < 128 # Requires lz4 if payload > 128 bytes
|
||||||
@@ -159,8 +160,6 @@ def smsgEncrypt(
|
|||||||
smsg_version = bytes((2, 1))
|
smsg_version = bytes((2, 1))
|
||||||
smsg_flags = bytes((0,))
|
smsg_flags = bytes((0,))
|
||||||
|
|
||||||
smsg_ttl = SMSG_MIN_TTL
|
|
||||||
|
|
||||||
assert len(R) == 33
|
assert len(R) == 33
|
||||||
assert len(mac) == 32
|
assert len(mac) == 32
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user