1
0

lnworker/lnpeer: add some type hints, force some kwargs

This commit is contained in:
SomberNight
2021-02-24 20:03:12 +01:00
parent d800f88bfc
commit 691ebaf4f8
5 changed files with 160 additions and 71 deletions

View File

@@ -437,9 +437,12 @@ class OnionRoutingFailure(Exception):
return str(self.code.name)
return f"Unknown error ({self.code!r})"
def construct_onion_error(reason: OnionRoutingFailure,
onion_packet: OnionPacket,
our_onion_private_key: bytes) -> bytes:
def construct_onion_error(
reason: OnionRoutingFailure,
onion_packet: OnionPacket,
our_onion_private_key: bytes,
) -> bytes:
# create payload
failure_msg = reason.to_bytes()
failure_len = len(failure_msg)