|
10 | 10 | //! Various user-configurable channel limits and settings which ChannelManager
|
11 | 11 | //! applies for you.
|
12 | 12 |
|
13 |
| -use ln::channelmanager::{BREAKDOWN_TIMEOUT, MIN_CLTV_EXPIRY_DELTA, MAX_LOCAL_BREAKDOWN_TIMEOUT}; |
| 13 | +use ln::channelmanager::{BREAKDOWN_TIMEOUT, MAX_LOCAL_BREAKDOWN_TIMEOUT}; |
14 | 14 |
|
15 | 15 | /// Configuration we set when applicable.
|
16 | 16 | ///
|
@@ -172,10 +172,14 @@ pub struct ChannelConfig {
|
172 | 172 | /// Thus, for HTLC-encumbered balances to be enforced on-chain when a channel is force-closed,
|
173 | 173 | /// we (or one of our watchtowers) MUST be online to check for broadcast of the current
|
174 | 174 | /// commitment transaction at least once per this many blocks (plus some margin to allow us
|
175 |
| - /// enough time to broadcast and confirm a transaction). |
| 175 | + /// enough time to broadcast and confirm a transaction, possibly with time in between to RBF |
| 176 | + /// the spending transaction). |
176 | 177 | ///
|
177 |
| - /// Default value: [`MIN_CLTV_EXPIRY_DELTA`], which we enforce as a minimum so you can change |
178 |
| - /// the config to ask for more security, not less. |
| 178 | + /// Default value: 72 (12 hours at an average of 6 blocks/hour). |
| 179 | + /// Minimum value: [`MIN_CLTV_EXPIRY_DELTA`], any values less than this will be treated as |
| 180 | + /// [`MIN_CLTV_EXPIRY_DELTA`] instead. |
| 181 | + /// |
| 182 | + /// [`MIN_CLTV_EXPIRY_DELTA`]: ln::channelmanager::MIN_CLTV_EXPIRY_DELTA |
179 | 183 | pub cltv_expiry_delta: u16,
|
180 | 184 | /// Set to announce the channel publicly and notify all nodes that they can route via this
|
181 | 185 | /// channel.
|
@@ -208,7 +212,7 @@ impl Default for ChannelConfig {
|
208 | 212 | fn default() -> Self {
|
209 | 213 | ChannelConfig {
|
210 | 214 | fee_proportional_millionths: 0,
|
211 |
| - cltv_expiry_delta: MIN_CLTV_EXPIRY_DELTA, |
| 215 | + cltv_expiry_delta: 6 * 12, // 6 blocks/hour * 12 hours |
212 | 216 | announced_channel: false,
|
213 | 217 | commit_upfront_shutdown_pubkey: true,
|
214 | 218 | }
|
|
0 commit comments