1
0

lnaddr: add feature bit support to invoices

see https://github.com/lightningnetwork/lightning-rfc/pull/656
This commit is contained in:
SomberNight
2020-03-24 15:31:19 +01:00
parent a66437f399
commit 4b78bf94d4
5 changed files with 64 additions and 23 deletions

View File

@@ -87,7 +87,7 @@ class LegacyHopDataPayload:
@classmethod
def from_tlv_dict(cls, d: dict) -> 'LegacyHopDataPayload':
return LegacyHopDataPayload(
short_channel_id=d["short_channel_id"]["short_channel_id"],
short_channel_id=d["short_channel_id"]["short_channel_id"] if "short_channel_id" in d else b"\x00" * 8,
amt_to_forward=d["amt_to_forward"]["amt_to_forward"],
outgoing_cltv_value=d["outgoing_cltv_value"]["outgoing_cltv_value"],
)