Skip to content

Commit c974225

Browse files
committed
Add trampoline feature flag.
1 parent 2c9dbb9 commit c974225

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lightning/src/ln/features.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
//! for more info).
6767
//! - `Keysend` - send funds to a node without an invoice
6868
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
69+
//! - `Trampoline` - supports receiving and forwarding Trampoline payments
70+
//! (see the [`Trampoline` feature proposal](https://github.com/lightning/bolts/pull/836) for more information).
6971
//!
7072
//! LDK knows about the following features, but does not support them:
7173
//! - `AnchorsNonzeroFeeHtlcTx` - the initial version of anchor outputs, which was later found to be
@@ -152,6 +154,8 @@ mod sealed {
152154
ChannelType | SCIDPrivacy,
153155
// Byte 6
154156
ZeroConf,
157+
// Byte 7
158+
Trampoline,
155159
]);
156160
define_context!(NodeContext, [
157161
// Byte 0
@@ -168,6 +172,8 @@ mod sealed {
168172
ChannelType | SCIDPrivacy,
169173
// Byte 6
170174
ZeroConf | Keysend,
175+
// Byte 7
176+
Trampoline,
171177
]);
172178
define_context!(ChannelContext, []);
173179
define_context!(Bolt11InvoiceContext, [
@@ -185,6 +191,8 @@ mod sealed {
185191
,
186192
// Byte 6
187193
PaymentMetadata,
194+
// Byte 7
195+
Trampoline,
188196
]);
189197
define_context!(OfferContext, []);
190198
define_context!(InvoiceRequestContext, []);
@@ -420,6 +428,9 @@ mod sealed {
420428
define_feature!(55, Keysend, [NodeContext],
421429
"Feature flags for keysend payments.", set_keysend_optional, set_keysend_required,
422430
supports_keysend, requires_keysend);
431+
define_feature!(57, Trampoline, [InitContext, NodeContext, Bolt11InvoiceContext],
432+
"Feature flags for Trampoline routing.", set_trampoline_routing_optional, set_trampoline_routing_required,
433+
supports_trampoline_routing, requires_trampoline_routing);
423434
// Note: update the module-level docs when a new feature bit is added!
424435

425436
#[cfg(test)]

0 commit comments

Comments
 (0)