From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Mon, 8 Mar 2021 23:44:18 +0000 (-0800) Subject: Merge pull request #826 from valentinewallace/raise-max-to-self-delay X-Git-Tag: v0.0.13~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2cb655b3b188e521028817bf2506b5a99f9071e7;hp=6b707c6f23dfa84bbb362bcdd37ba53c71ec4f53;p=rust-lightning Merge pull request #826 from valentinewallace/raise-max-to-self-delay Raise max to_self_delay. --- diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index de0ce535..faae2c51 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -508,11 +508,12 @@ impl<'a> Drop for PersistenceNotifierGuard<'a> { } } -/// The amount of time 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). +/// 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; -/// The amount of time we're willing to wait to claim money back to us -pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 6 * 24 * 7; +/// 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; /// The minimum number of blocks between an inbound HTLC's CLTV and the corresponding outbound /// HTLC's CLTV. This should always be a few blocks greater than channelmonitor::CLTV_CLAIM_BUFFER, diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index f43423d7..19c45621 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -129,8 +129,8 @@ pub struct ChannelHandshakeLimits { /// Not checking this value would be a security issue, as our peer would be able to set it to /// max relative lock-time (a year) and we would "lose" money as it would be locked for a long time. /// - /// Default value: MAX_LOCAL_BREAKDOWN_TIMEOUT (1008), which we also enforce as a maximum value - /// so you can tweak config to reduce the loss of having useless locked funds (if your peer accepts) + /// Default value: 2016, which we also enforce as a maximum value so you can tweak config to + /// reduce the loss of having useless locked funds (if your peer accepts) pub their_to_self_delay: u16 }