lncfg: increase DefaultIncomingBroadcastDelta to 16
What changed, and why it matters
This commit changes a default safety margin in LND, the Lightning Network Daemon. It makes the software force-close payment channels 16 blocks before an HTLC (a conditional Bitcoin payment) expires, instead of 10. The goal is to give more time for the user's transaction to be confirmed on the Bitcoin blockchain, especially because LND now waits longer before sweeping funds to protect against blockchain reorganizations. This is a defensive hardening change, not a fix for an active exploit, but it reduces the risk of losing funds in edge cases where block confirmations are slow or contested.
Treat as a routine defensive hardening commit. No urgent action required. Operators and integrators may want to note the changed default if they override this constant or rely on specific force-close timing assumptions. Continue normal review and testing.
Security signals we found
Default safety margin increased for on-chain HTLC sweep window
Comment explicitly references reorg safety and sweep confirmation time
Change is defensive hardening in payment channel force-close logic
No bug fix, bounds check, input validation, or cryptographic change present
No vendor disclosure of security relevance in commit or message
Evidence from the diff
The patch increases DefaultIncomingBroadcastDelta from 10 to 16 blocks in lncfg/config.go. This constant controls how many blocks before an incoming HTLC’s CLTV expiry LND will force-close a channel (when it holds the preimage) in order to sweep the HTLC on-chain. The accompanying comment is updated to explain that the new value accounts for up to 6 blocks of close-transaction confirmation delay for reorg safety, plus time to broadcast and confirm the sweep/second-level success transaction. The change is framed by the commit message as a proactive safety margin increase, not a response to a disclosed vulnerability.
Changed components
lncfg/config.goDefaultIncomingBroadcastDelta constantIncoming HTLC force-close / sweep timing logicInspect captured patch +10 / −5
diff --git a/lncfg/config.go b/lncfg/config.go
index 178ef20..c0ab51f 100644
--- a/lncfg/config.go
+++ b/lncfg/config.go
@@ -20,11 +20,16 @@ const (
// DefaultIncomingBroadcastDelta defines the number of blocks before the
// expiry of an incoming htlc at which we force close the channel. We
// only go to chain if we also have the preimage to actually pull in the
- // htlc. BOLT #2 suggests 7 blocks. We use a few more for extra safety.
- // Within this window we need to get our sweep or 2nd level success tx
- // confirmed, because after that the remote party is also able to claim
- // the htlc using the timeout path.
- DefaultIncomingBroadcastDelta = 10
+ // htlc. BOLT #2 suggests 7 blocks. We use more for extra safety.
+ //
+ // The value accounts for:
+ // - Up to 6 blocks waiting for close tx confirmation (reorg safety)
+ // - Time to broadcast and confirm our sweep/2nd level success tx
+ //
+ // Within this window we need to get our sweep confirmed, because after
+ // that the remote party is also able to claim the htlc using the
+ // timeout path.
+ DefaultIncomingBroadcastDelta = 16
// DefaultFinalCltvRejectDelta defines the number of blocks before the
// expiry of an incoming exit hop htlc at which we cancel it back
Why this scored 34/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.