]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add a bLIP-range feature flag for inbound fees
authorMatt Corallo <git@bluematt.me>
Sun, 8 Jan 2023 04:18:26 +0000 (04:18 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 9 Jan 2023 03:45:52 +0000 (03:45 +0000)
lightning/src/ln/features.rs

index a3c1b7f623d1f2a355516638e75432e61a04fa71..21270129aa8f8ec24c9f8254aa38b4e32ac6ce1a 100644 (file)
@@ -131,6 +131,10 @@ mod sealed {
                ChannelType | SCIDPrivacy,
                // Byte 6
                ZeroConf,
+               // Because bLIP features are required to start above 255, we need a lot of commas.
+               ,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+               // Byte 35
+               InboundFees,
        ]);
        define_context!(NodeContext, [
                // Byte 0
@@ -147,6 +151,10 @@ mod sealed {
                ChannelType | SCIDPrivacy,
                // Byte 6
                ZeroConf | Keysend,
+               // Because bLIP features are required to start above 255, we need a lot of commas.
+               ,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+               // Byte 35
+               InboundFees,
        ]);
        define_context!(ChannelContext, []);
        define_context!(InvoiceContext, [
@@ -376,6 +384,10 @@ mod sealed {
                "Feature flags for keysend payments.", set_keysend_optional, set_keysend_required,
                supports_keysend, requires_keysend);
 
+       define_feature!(283, InboundFees, [InitContext, NodeContext],
+               "Feature flags for inbound fees", set_inbound_fees_optional, set_inbound_fees_required,
+               supports_inbound_fees, requires_inbound_fees);
+
        #[cfg(test)]
        define_feature!(123456789, UnknownFeature,
                [NodeContext, ChannelContext, InvoiceContext, OfferContext, InvoiceRequestContext, Bolt12InvoiceContext, BlindedHopContext],