Skip to content

Commit 3d27992

Browse files
committed
lnonion: (trivial) make OnionPacket.__init__ kw-only
1 parent 862f76b commit 3d27992

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

electrum/lnonion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __repr__(self):
114114

115115
class OnionPacket:
116116

117-
def __init__(self, public_key: bytes, hops_data: bytes, hmac: bytes, version: int = 0):
117+
def __init__(self, *, public_key: bytes, hops_data: bytes, hmac: bytes, version: int = 0):
118118
assert len(public_key) == 33
119119
assert len(hops_data) in [HOPS_DATA_SIZE, TRAMPOLINE_HOPS_DATA_SIZE, ONION_MESSAGE_LARGE_SIZE]
120120
assert len(hmac) == PER_HOP_HMAC_SIZE

0 commit comments

Comments
 (0)