Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: omitting parameter that has a default value gives an error message, rather than using the default #5008

Closed
microlancer opened this issue Feb 11, 2021 · 2 comments

Comments

@microlancer
Copy link

Background

When running lncli updatechanpolicy the time_lock_delta parameter has a "default: 0" according to the --help documentation. However, omitting it results in an error saying time_lock_delta is missing.

Your environment

  • lnd v0.12.0-beta
  • Linux debian 4.9.0-12-amd64 Fix name typo in README #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64 Linux
  • bitcoind

Steps to reproduce

# lncli updatechanpolicy --help
NAME:
   lncli updatechanpolicy - Update the channel policy for all channels, or a single channel.

USAGE:
   lncli updatechanpolicy [command options] base_fee_msat fee_rate time_lock_delta [--max_htlc_msat=N] [channel_point]

CATEGORY:
   Channels

DESCRIPTION:

  Updates the channel policy for all channels, or just a particular channel
  identified by its channel point. The update will be committed, and
  broadcast to the rest of the network within the next batch.
  Channel points are encoded as: funding_txid:output_index

OPTIONS:
   --base_fee_msat value    the base fee in milli-satoshis that will be charged for each forwarded HTLC, regardless of payment size (default: 0)
   --fee_rate value         the fee rate that will be charged proportionally based on the value of each forwarded HTLC, the lowest possible rate is 0 with a granularity of 0.000001 (millionths)
   --time_lock_delta value  the CLTV delta that will be applied to all forwarded HTLCs (default: 0)
   --min_htlc_msat value    if set, the min HTLC size that will be applied to all forwarded HTLCs. If unset, the min HTLC is left unchanged. (default: 0)
   --max_htlc_msat value    if set, the max HTLC size that will be applied to all forwarded HTLCs. If unset, the max HTLC is left unchanged. (default: 0)
   --chan_point value       The channel whose fee policy should be updated, if nil the policies for all channels will be updated. Takes the form of: txid:output_index

bash-5.0# lncli updatechanpolicy --base_fee_msat 1000 --fee_rate 0.000001
[lncli] time_lock_delta argument missing

Expected behaviour

Command should succeed (or we just need to update the documentation?)

Actual behaviour

Command fails

@microlancer
Copy link
Author

Per the USAGE line in the help, it looks like the three parameters base_fee_msat, fee_rate, and time_lock_delta are all required. So I think the fix for this issue would be to simply remove the "(default: 0)" because I'm not sure how/when that default would end up being used since a value must be supplied.

@guggero
Copy link
Collaborator

guggero commented Feb 11, 2021

Closing as duplicate of #1523.

@guggero guggero closed this as completed Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants