68
68
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
69
69
//! - `Trampoline` - supports receiving and forwarding Trampoline payments
70
70
//! (see the [`Trampoline` feature proposal](https://github.com/lightning/bolts/pull/836) for more information).
71
+ //! - `provide_peer_backup_storage` - Indicates that we offer the capability to store data of our peers
72
+ //! (see https://github.com/lightning/bolts/pull/1110 for more info).
71
73
//!
72
74
//! LDK knows about the following features, but does not support them:
73
75
//! - `AnchorsNonzeroFeeHtlcTx` - the initial version of anchor outputs, which was later found to be
@@ -153,7 +155,7 @@ mod sealed {
153
155
// Byte 4
154
156
OnionMessages ,
155
157
// Byte 5
156
- ChannelType | SCIDPrivacy ,
158
+ ProvidePeerBackupStorage | ChannelType | SCIDPrivacy ,
157
159
// Byte 6
158
160
ZeroConf ,
159
161
// Byte 7
@@ -171,7 +173,7 @@ mod sealed {
171
173
// Byte 4
172
174
OnionMessages ,
173
175
// Byte 5
174
- ChannelType | SCIDPrivacy ,
176
+ ProvidePeerBackupStorage | ChannelType | SCIDPrivacy ,
175
177
// Byte 6
176
178
ZeroConf | Keysend ,
177
179
// Byte 7
@@ -415,6 +417,9 @@ mod sealed {
415
417
define_feature ! ( 39 , OnionMessages , [ InitContext , NodeContext ] ,
416
418
"Feature flags for `option_onion_messages`." , set_onion_messages_optional,
417
419
set_onion_messages_required, supports_onion_messages, requires_onion_messages) ;
420
+ define_feature ! ( 43 , ProvidePeerBackupStorage , [ InitContext , NodeContext ] ,
421
+ "Feature flags for `provide_peer_backup_storage`." , set_provide_peer_backup_storage_optional,
422
+ set_provide_peer_backup_storage_required, supports_provide_peer_storage, requires_provide_peer_storage) ;
418
423
define_feature ! ( 45 , ChannelType , [ InitContext , NodeContext ] ,
419
424
"Feature flags for `option_channel_type`." , set_channel_type_optional,
420
425
set_channel_type_required, supports_channel_type, requires_channel_type) ;
@@ -1083,6 +1088,14 @@ mod tests {
1083
1088
assert ! ( !features1. requires_unknown_bits_from( & features2) ) ;
1084
1089
assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1085
1090
1091
+ features1. set_provide_peer_backup_storage_required ( ) ;
1092
+ assert ! ( features1. requires_unknown_bits_from( & features2) ) ;
1093
+ assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1094
+
1095
+ features2. set_provide_peer_backup_storage_optional ( ) ;
1096
+ assert ! ( !features1. requires_unknown_bits_from( & features2) ) ;
1097
+ assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1098
+
1086
1099
features1. set_data_loss_protect_required ( ) ;
1087
1100
assert ! ( features1. requires_unknown_bits_from( & features2) ) ;
1088
1101
assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
0 commit comments