]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Advertise keysend feature
authorValentine Wallace <vwallace@protonmail.com>
Fri, 14 May 2021 20:34:56 +0000 (16:34 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Tue, 27 Jul 2021 19:15:23 +0000 (15:15 -0400)
C-Lightning requires us to advertise this feature before they'll
attempt a keysend payment to us.

lightning/src/ln/features.rs

index 5d908ee01a4957bd7c85d305043af8e5204523a2..492cf5ccd198c2829b73b81ab4e5558b9cd14028 100644 (file)
@@ -124,6 +124,12 @@ mod sealed {
                        ,
                        // Byte 3
                        ,
+                       // Byte 4
+                       ,
+                       // Byte 5
+                       ,
+                       // Byte 6
+                       ,
                ],
                optional_features: [
                        // Byte 0
@@ -134,6 +140,12 @@ mod sealed {
                        BasicMPP,
                        // Byte 3
                        ShutdownAnySegwit,
+                       // Byte 4
+                       ,
+                       // Byte 5
+                       ,
+                       // Byte 6
+                       Keysend,
                ],
        });
        define_context!(ChannelContext {
@@ -299,6 +311,8 @@ mod sealed {
        define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext],
                "Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional,
                set_shutdown_any_segwit_required);
+       define_feature!(55, Keysend, [NodeContext],
+               "Feature flags for keysend payments.", set_keysend_optional, set_keysend_required);
 
        #[cfg(test)]
        define_feature!(123456789, UnknownFeature, [NodeContext, ChannelContext, InvoiceContext],