Skip to content

Commit 401187d

Browse files
committed
Add features module-level documentation for missing features
1 parent 2da411f commit 401187d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

lightning/src/ln/features.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message) for more information).
3636
//! - `GossipQueries` - requires/supports more sophisticated gossip control
3737
//! (see [BOLT-7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md) for more information).
38+
//! - `VariableLengthOnion` - allows onion data to be of variable length
39+
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) note that
40+
//! it now only describes variable length onions).
3841
//! - `PaymentSecret` - requires/supports that a node supports payment_secret field
3942
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) for more information).
4043
//! - `BasicMPP` - requires/supports that a node can receive basic multi-part payments
@@ -45,17 +48,25 @@
4548
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
4649
//! - `OnionMessages` - requires/supports forwarding onion messages
4750
//! (see [BOLT-7](https://github.com/lightning/bolts/pull/759/files) for more information).
48-
//! TODO: update link
51+
// TODO: update link
4952
//! - `ChannelType` - node supports the channel_type field in open/accept
5053
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
5154
//! - `SCIDPrivacy` - supply channel aliases for routing
5255
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
56+
//! - `PaymentMetadata` - include additional data in invoices which is passed to recipients in the
57+
//! onion.
58+
//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for
59+
//! more).
60+
//! - `ZeroConf` - supports accepting HTLCs and using channels prior to funding confirmation
61+
//! (see
62+
//! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message)
63+
//! for more info).
5364
//! - `Keysend` - send funds to a node without an invoice
5465
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
5566
//! - `AnchorsZeroFeeHtlcTx` - requires/supports that commitment transactions include anchor outputs
56-
//! and HTLC transactions are pre-signed with zero fee (see
57-
//! [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more
58-
//! information).
67+
//! and HTLC transactions are pre-signed with zero fee (see
68+
//! [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more
69+
//! information).
5970
//!
6071
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
6172
//! [messages]: crate::ln::msgs
@@ -394,6 +405,7 @@ mod sealed {
394405
define_feature!(55, Keysend, [NodeContext],
395406
"Feature flags for keysend payments.", set_keysend_optional, set_keysend_required,
396407
supports_keysend, requires_keysend);
408+
// Note: update the module-level docs when a new feature bit is added!
397409

398410
#[cfg(test)]
399411
define_feature!(123456789, UnknownFeature,

0 commit comments

Comments
 (0)