Skip to content

Commit

Permalink
options: remove unused 'commit-fee-min/max' options.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and cdecker committed Oct 13, 2020
1 parent 6195d95 commit 4ba9ad6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 43 deletions.
10 changes: 1 addition & 9 deletions doc/lightningd-config.5
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,6 @@ The percentage of \fIestimatesmartfee 2/CONSERVATIVE\fR to use for the commitmen
transactions: default is 100\.


\fBcommit-fee-min\fR=\fIPERCENT\fR
\fBcommit-fee-max\fR=\fIPERCENT\fR
Limits on what onchain fee range we’ll allow when a node opens a channel
with us, as a percentage of \fIestimatesmartfee 2\fR\. If they’re outside
this range, we abort their opening attempt\. Note that \fBcommit-fee-max\fR
can (should!) be greater than 100\.


\fBmax-concurrent-htlcs\fR=\fIINTEGER\fR
Number of HTLCs one channel can handle concurrently in each direction\.
Should be between 1 and 483 (default 30)\.
Expand Down Expand Up @@ -589,4 +581,4 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Note: the modules in the ccan/ directory have their own licenses, but
the rest of the code is covered by the BSD-style MIT license\.

\" SHA256STAMP:8e80667950a40a059a3a320a095c2313bc99b00de06bb892c47f22cf458d6493
\" SHA256STAMP:9d72136e5abae6cb8f36899ebaeed6644ea566e95ec1a6f8b13cc911ed64a294
7 changes: 0 additions & 7 deletions doc/lightningd-config.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,6 @@ opens a channel before the channel is usable.
The percentage of *estimatesmartfee 2/CONSERVATIVE* to use for the commitment
transactions: default is 100.

**commit-fee-min**=*PERCENT*
**commit-fee-max**=*PERCENT*
Limits on what onchain fee range we’ll allow when a node opens a channel
with us, as a percentage of *estimatesmartfee 2*. If they’re outside
this range, we abort their opening attempt. Note that **commit-fee-max**
can (should!) be greater than 100.

**max-concurrent-htlcs**=*INTEGER*
Number of HTLCs one channel can handle concurrently in each direction.
Should be between 1 and 483 (default 30).
Expand Down
6 changes: 0 additions & 6 deletions lightningd/lightningd.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ struct config {
/* How many confirms until we consider an anchor "settled". */
u32 anchor_confirms;

/* Maximum percent of fee rate we'll accept. */
u32 commitment_fee_max_percent;

/* Minimum percent of fee rate we'll accept. */
u32 commitment_fee_min_percent;

/* Minimum CLTV to subtract from incoming HTLCs to outgoing */
u32 cltv_expiry_delta;

Expand Down
21 changes: 0 additions & 21 deletions lightningd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,6 @@ static const struct config testnet_config = {
/* We're fairly trusting, under normal circumstances. */
.anchor_confirms = 1,

/* Testnet fees are crazy, allow infinite feerange. */
.commitment_fee_min_percent = 0,
.commitment_fee_max_percent = 0,

/* Testnet blockspace is free. */
.max_concurrent_htlcs = 483,

Expand Down Expand Up @@ -658,10 +654,6 @@ static const struct config mainnet_config = {
/* We're fairly trusting, under normal circumstances. */
.anchor_confirms = 3,

/* Insist between 2 and 20 times the 2-block fee. */
.commitment_fee_min_percent = 200,
.commitment_fee_max_percent = 2000,

/* While up to 483 htlcs are possible we do 30 by default (as eclair does) to save blockspace */
.max_concurrent_htlcs = 30,

Expand Down Expand Up @@ -707,13 +699,6 @@ static const struct config mainnet_config = {

static void check_config(struct lightningd *ld)
{
/* We do this by ensuring it's less than the minimum we would accept. */
if (ld->config.commitment_fee_max_percent != 0
&& ld->config.commitment_fee_max_percent
< ld->config.commitment_fee_min_percent)
fatal("Commitment fee invalid min-max %u-%u",
ld->config.commitment_fee_min_percent,
ld->config.commitment_fee_max_percent);
/* BOLT #2:
*
* The receiving node MUST fail the channel if:
Expand Down Expand Up @@ -861,12 +846,6 @@ static void register_opts(struct lightningd *ld)
opt_register_arg("--funding-confirms", opt_set_u32, opt_show_u32,
&ld->config.anchor_confirms,
"Confirmations required for funding transaction");
opt_register_arg("--commit-fee-min=<percent>", opt_set_u32, opt_show_u32,
&ld->config.commitment_fee_min_percent,
"Minimum percentage of fee to accept for commitment");
opt_register_arg("--commit-fee-max=<percent>", opt_set_u32, opt_show_u32,
&ld->config.commitment_fee_max_percent,
"Maximum percentage of fee to accept for commitment (0 for unlimited)");
opt_register_arg("--cltv-delta", opt_set_u32, opt_show_u32,
&ld->config.cltv_expiry_delta,
"Number of blocks for cltv_expiry_delta");
Expand Down

0 comments on commit 4ba9ad6

Please sign in to comment.