Skip to content

Commit b75437d

Browse files
Raise max to_self_delay.
lnd requires this to_self_delay for the max channel size (excluding wumbo).
1 parent 8b4ea56 commit b75437d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,12 @@ impl<'a> Drop for PersistenceNotifierGuard<'a> {
508508
}
509509
}
510510

511-
/// The amount of time we require our counterparty wait to claim their money (ie time between when
512-
/// we, or our watchtower, must check for them having broadcast a theft transaction).
511+
/// The amount of time in blocks we require our counterparty wait to claim their money (ie time
512+
/// between when we, or our watchtower, must check for them having broadcast a theft transaction).
513513
pub(crate) const BREAKDOWN_TIMEOUT: u16 = 6 * 24;
514-
/// The amount of time we're willing to wait to claim money back to us
515-
pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 6 * 24 * 7;
514+
/// The amount of time in blocks we're willing to wait to claim money back to us. This matches
515+
/// the maximum required amount in lnd as of March 2021.
516+
pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 2 * 6 * 24 * 7;
516517

517518
/// The minimum number of blocks between an inbound HTLC's CLTV and the corresponding outbound
518519
/// HTLC's CLTV. This should always be a few blocks greater than channelmonitor::CLTV_CLAIM_BUFFER,

lightning/src/util/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ pub struct ChannelHandshakeLimits {
129129
/// Not checking this value would be a security issue, as our peer would be able to set it to
130130
/// max relative lock-time (a year) and we would "lose" money as it would be locked for a long time.
131131
///
132-
/// Default value: MAX_LOCAL_BREAKDOWN_TIMEOUT (1008), which we also enforce as a maximum value
133-
/// so you can tweak config to reduce the loss of having useless locked funds (if your peer accepts)
132+
/// Default value: 2016, which we also enforce as a maximum value so you can tweak config to
133+
/// reduce the loss of having useless locked funds (if your peer accepts)
134134
pub their_to_self_delay: u16
135135
}
136136

0 commit comments

Comments
 (0)