From: Matt Corallo Date: Wed, 17 Mar 2021 17:40:10 +0000 (-0400) Subject: Expose the constants mentioned in docs, and use doc links X-Git-Tag: v0.0.14~46^2~5 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c88e3eb4522b7e027d5c4b58702ac6a752cbe423;p=rust-lightning Expose the constants mentioned in docs, and use doc links --- diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 45849c920..dd3fac1b6 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -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; diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index 19c456210..6c46421a9 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -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.