1
0

lnonion: (trivial) make OnionPacket.__init__ kw-only

This commit is contained in:
SomberNight
2025-09-29 17:09:15 +00:00
parent 862f76bfef
commit 3d27992fb7

View File

@@ -114,7 +114,7 @@ class OnionHopsDataSingle: # called HopData in lnd
class OnionPacket:
def __init__(self, public_key: bytes, hops_data: bytes, hmac: bytes, version: int = 0):
def __init__(self, *, public_key: bytes, hops_data: bytes, hmac: bytes, version: int = 0):
assert len(public_key) == 33
assert len(hops_data) in [HOPS_DATA_SIZE, TRAMPOLINE_HOPS_DATA_SIZE, ONION_MESSAGE_LARGE_SIZE]
assert len(hmac) == PER_HOP_HMAC_SIZE