From 3ea1f7f8218fc8f6f1b46f5636cf6b9d0a0acdaf Mon Sep 17 00:00:00 2001 From: Arik Sosman Date: Thu, 5 Dec 2024 07:31:02 -0800 Subject: [PATCH] Support Trampoline flag in BOLT12 invoices To construct and pay BOLT12 invoices supporting Trampoline payments, we need to add the Trampoline feature bit to the BOLT12 feature context. --- lightning-types/src/features.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lightning-types/src/features.rs b/lightning-types/src/features.rs index a1487721b24..2dd9b14bd35 100644 --- a/lightning-types/src/features.rs +++ b/lightning-types/src/features.rs @@ -212,6 +212,16 @@ mod sealed { , // Byte 2 BasicMPP, + // Byte 3 + , + // Byte 4 + , + // Byte 5 + , + // Byte 6 + , + // Byte 7 + Trampoline, ]); define_context!(BlindedHopContext, []); // This isn't a "real" feature context, and is only used in the channel_type field in an @@ -573,7 +583,7 @@ mod sealed { define_feature!( 57, Trampoline, - [InitContext, NodeContext, Bolt11InvoiceContext], + [InitContext, NodeContext, Bolt11InvoiceContext, Bolt12InvoiceContext], "Feature flags for Trampoline routing.", set_trampoline_routing_optional, set_trampoline_routing_required,