@@ -87,7 +87,7 @@ pub struct ChannelHandshakeConfig {
87
87
///
88
88
/// If this option is set, channels may be created that will not be readable by LDK versions
89
89
/// prior to 0.0.106, causing [`ChannelManager`]'s read method to return a
90
- /// [`DecodeError:InvalidValue`].
90
+ /// [`DecodeError:: InvalidValue`].
91
91
///
92
92
/// Note that setting this to true does *not* prevent us from opening channels with
93
93
/// counterparties that do not support the `scid_alias` option; we will simply fall back to a
@@ -100,7 +100,7 @@ pub struct ChannelHandshakeConfig {
100
100
/// Default value: false. This value is likely to change to true in the future.
101
101
///
102
102
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
103
- /// [`DecodeError:InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
103
+ /// [`DecodeError:: InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue
104
104
pub negotiate_scid_privacy : bool ,
105
105
/// Set to announce the channel publicly and notify all nodes that they can route via this
106
106
/// channel.
@@ -112,6 +112,20 @@ pub struct ChannelHandshakeConfig {
112
112
///
113
113
/// Default value: false.
114
114
pub announced_channel : bool ,
115
+ /// When set, we commit to an upfront shutdown_pubkey at channel open. If our counterparty
116
+ /// supports it, they will then enforce the mutual-close output to us matches what we provided
117
+ /// at intialization, preventing us from closing to an alternate pubkey.
118
+ ///
119
+ /// This is set to true by default to provide a slight increase in security, though ultimately
120
+ /// any attacker who is able to take control of a channel can just as easily send the funds via
121
+ /// lightning payments, so we never require that our counterparties support this option.
122
+ ///
123
+ /// The upfront key committed is provided from [`KeysInterface::get_shutdown_scriptpubkey`].
124
+ ///
125
+ /// Default value: true.
126
+ ///
127
+ /// [`KeysInterface::get_shutdown_scriptpubkey`]: crate::chain::keysinterface::KeysInterface::get_shutdown_scriptpubkey
128
+ pub commit_upfront_shutdown_pubkey : bool ,
115
129
}
116
130
117
131
impl Default for ChannelHandshakeConfig {
@@ -123,6 +137,7 @@ impl Default for ChannelHandshakeConfig {
123
137
max_inbound_htlc_value_in_flight_percent_of_channel : 10 ,
124
138
negotiate_scid_privacy : false ,
125
139
announced_channel : false ,
140
+ commit_upfront_shutdown_pubkey : true ,
126
141
}
127
142
}
128
143
}
@@ -278,18 +293,8 @@ pub struct ChannelConfig {
278
293
pub cltv_expiry_delta : u16 ,
279
294
/// Deprecated, use [`ChannelHandshakeConfig::announced_channel`] instead.
280
295
pub ( crate ) announced_channel : bool ,
281
- /// When set, we commit to an upfront shutdown_pubkey at channel open. If our counterparty
282
- /// supports it, they will then enforce the mutual-close output to us matches what we provided
283
- /// at intialization, preventing us from closing to an alternate pubkey.
284
- ///
285
- /// This is set to true by default to provide a slight increase in security, though ultimately
286
- /// any attacker who is able to take control of a channel can just as easily send the funds via
287
- /// lightning payments, so we never require that our counterparties support this option.
288
- ///
289
- /// This cannot be changed after a channel has been initialized.
290
- ///
291
- /// Default value: true.
292
- pub commit_upfront_shutdown_pubkey : bool ,
296
+ /// Deprecated, use [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`] instead.
297
+ pub ( crate ) commit_upfront_shutdown_pubkey : bool ,
293
298
/// Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
294
299
/// small to claim on-chain.
295
300
///
0 commit comments