From 9e1d37e9ef1e60ce8f3e4614d9e94bd561c83f1c Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Fri, 5 Jan 2024 10:24:09 +0100 Subject: [PATCH] channeld: relax feerate increase security When the node has a small channel and the current chain fees are at an all time high, adding 10% to the chain fee rate for security is sufficient. Especially with anchors/zero-fee-htlc-tx. --- channeld/full_channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channeld/full_channel.c b/channeld/full_channel.c index 45639328ce26..8c094dd8d08b 100644 --- a/channeld/full_channel.c +++ b/channeld/full_channel.c @@ -560,9 +560,9 @@ static bool local_opener_has_fee_headroom(const struct channel *channel, option_anchors_zero_fee_htlc_tx, committed, adding, removing); - /* Now, how much would it cost us if feerate increases 100% and we added + /* Now, how much would it cost us if feerate increases 10% and we added * another HTLC? */ - fee = commit_tx_base_fee(2 * feerate, untrimmed + 1, + fee = commit_tx_base_fee(1.1 * feerate, untrimmed + 1, option_anchor_outputs, option_anchors_zero_fee_htlc_tx); if (amount_msat_greater_eq_sat(remainder, fee))