Expose the constants mentioned in docs, and use doc links
authorMatt Corallo <git@bluematt.me>
Wed, 17 Mar 2021 17:40:10 +0000 (13:40 -0400)
committerMatt Corallo <git@bluematt.me>
Thu, 18 Mar 2021 15:28:23 +0000 (11:28 -0400)
lightning/src/ln/channelmanager.rs
lightning/src/util/config.rs

index 45849c920219edb74cae08e360262bc3eca19532..dd3fac1b6dc3f248e7edcbba74c6ce1657d7d7e2 100644 (file)
@@ -513,7 +513,11 @@ impl<'a> Drop for PersistenceNotifierGuard<'a> {
 
 /// The amount of time in blocks we require our counterparty wait to claim their money (ie time
 /// between when we, or our watchtower, must check for them having broadcast a theft transaction).
-pub(crate) const BREAKDOWN_TIMEOUT: u16 = 6 * 24;
+///
+/// This can be increased (but not decreased) through [`ChannelHandshakeConfig::our_to_self_delay`]
+///
+/// [`ChannelHandshakeConfig::our_to_self_delay`]: crate::util::config::ChannelHandshakeConfig::our_to_self_delay
+pub const BREAKDOWN_TIMEOUT: u16 = 6 * 24;
 /// The amount of time in blocks we're willing to wait to claim money back to us. This matches
 /// the maximum required amount in lnd as of March 2021.
 pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 2 * 6 * 24 * 7;
index 19c4562105bff3aa15b1d6f88099a8da42a33669..6c46421a97b507685f87bf2d96a06ff8a91640f4 100644 (file)
@@ -33,7 +33,7 @@ pub struct ChannelHandshakeConfig {
        /// case of an honest unilateral channel close, which implicitly decrease the economic value of
        /// our channel.
        ///
-       /// Default value: BREAKDOWN_TIMEOUT (currently 144), we enforce it as a minimum at channel
+       /// Default value: [`BREAKDOWN_TIMEOUT`] (currently 144), we enforce it as a minimum at channel
        /// opening so you can tweak config to ask for more security, not less.
        pub our_to_self_delay: u16,
        /// Set to the smallest value HTLC we will accept to process.