From 3d27992fb7d8db86bc312b03028e09488f7d96b4 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 29 Sep 2025 17:09:15 +0000 Subject: [PATCH] lnonion: (trivial) make OnionPacket.__init__ kw-only --- electrum/lnonion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/lnonion.py b/electrum/lnonion.py index b80c8821a..67edaf506 100644 --- a/electrum/lnonion.py +++ b/electrum/lnonion.py @@ -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