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
@@ -151,7 +153,7 @@ mod sealed {
151
153
// Byte 4
152
154
OnionMessages ,
153
155
// Byte 5
154
- ChannelType | SCIDPrivacy ,
156
+ ProvidePeerBackupStorage | ChannelType | SCIDPrivacy ,
155
157
// Byte 6
156
158
ZeroConf ,
157
159
// Byte 7
@@ -169,7 +171,7 @@ mod sealed {
169
171
// Byte 4
170
172
OnionMessages ,
171
173
// Byte 5
172
- ChannelType | SCIDPrivacy ,
174
+ ProvidePeerBackupStorage | ChannelType | SCIDPrivacy ,
173
175
// Byte 6
174
176
ZeroConf | Keysend ,
175
177
// Byte 7
@@ -413,6 +415,9 @@ mod sealed {
413
415
define_feature ! ( 39 , OnionMessages , [ InitContext , NodeContext ] ,
414
416
"Feature flags for `option_onion_messages`." , set_onion_messages_optional,
415
417
set_onion_messages_required, supports_onion_messages, requires_onion_messages) ;
418
+ define_feature ! ( 43 , ProvidePeerBackupStorage , [ InitContext , NodeContext ] ,
419
+ "Feature flags for `provide_peer_backup_storage`." , set_provide_peer_backup_storage_optional,
420
+ set_provide_peer_backup_storage_required, supports_provide_peer_storage, requires_provide_peer_storage) ;
416
421
define_feature ! ( 45 , ChannelType , [ InitContext , NodeContext ] ,
417
422
"Feature flags for `option_channel_type`." , set_channel_type_optional,
418
423
set_channel_type_required, supports_channel_type, requires_channel_type) ;
@@ -1045,6 +1050,14 @@ mod tests {
1045
1050
assert ! ( !features1. requires_unknown_bits_from( & features2) ) ;
1046
1051
assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1047
1052
1053
+ features1. set_provide_peer_backup_storage_required ( ) ;
1054
+ assert ! ( features1. requires_unknown_bits_from( & features2) ) ;
1055
+ assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1056
+
1057
+ features2. set_provide_peer_backup_storage_optional ( ) ;
1058
+ assert ! ( !features1. requires_unknown_bits_from( & features2) ) ;
1059
+ assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
1060
+
1048
1061
features1. set_data_loss_protect_required ( ) ;
1049
1062
assert ! ( features1. requires_unknown_bits_from( & features2) ) ;
1050
1063
assert ! ( !features2. requires_unknown_bits_from( & features1) ) ;
0 commit comments