Skip to content

Commit

Permalink
channeld: relax feerate increase security
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JssDWt committed Jan 5, 2024
1 parent a59dbbd commit 21df515
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channeld/full_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 21df515

Please sign in to comment.