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

typos: fix updatechanpolicy typos #7888

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 29 additions & 27 deletions cmd/lncli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -2044,32 +2044,35 @@ var updateChannelPolicyCommand = cli.Command{
ArgsUsage: "base_fee_msat fee_rate time_lock_delta " +
"[--max_htlc_msat=N] [channel_point]",
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`,
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
`,
Flags: []cli.Flag{
cli.Int64Flag{
Name: "base_fee_msat",
Usage: "the base fee in milli-satoshis that will " +
"be charged for each forwarded HTLC, regardless " +
Usage: "the base fee in milli-satoshis that will be " +
"charged for each forwarded HTLC, regardless " +
"of payment size",
},
cli.StringFlag{
Name: "fee_rate",
Usage: "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). Can not " +
"be set at the same time as fee_rate_ppm.",
"forwarded HTLC, the lowest possible rate is " +
"0 with a granularity of 0.000001 " +
"(millionths). Can not be set at the same " +
"time as fee_rate_ppm",
},
cli.Uint64Flag{
Name: "fee_rate_ppm",
Usage: "the fee rate ppm (parts per million) 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). Can not " +
"be set at the same time as fee_rate.",
"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). Can not be set at " +
"the same time as fee_rate",
},
cli.Uint64Flag{
Name: "time_lock_delta",
Expand All @@ -2078,21 +2081,22 @@ var updateChannelPolicyCommand = cli.Command{
},
cli.Uint64Flag{
Name: "min_htlc_msat",
Usage: "if set, the min HTLC size that will be applied " +
"to all forwarded HTLCs. If unset, the min HTLC " +
"is left unchanged.",
Usage: "if set, the min HTLC size that will be " +
"applied to all forwarded HTLCs. If unset, " +
"the min HTLC is left unchanged",
},
cli.Uint64Flag{
Name: "max_htlc_msat",
Usage: "if set, the max HTLC size that will be applied " +
"to all forwarded HTLCs. If unset, the max HTLC " +
"is left unchanged.",
Usage: "if set, the max HTLC size that will be " +
"applied to all forwarded HTLCs. If unset, " +
"the max HTLC is left unchanged",
},
cli.StringFlag{
Name: "chan_point",
Usage: "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",
Usage: "the channel which this policy update should " +
"be applied to. If nil, the policies for all " +
"channels will be updated. Takes the form of " +
"txid:output_index",
},
},
Action: actionDecorator(updateChannelPolicy),
Expand Down Expand Up @@ -2122,12 +2126,10 @@ func parseChanPoint(s string) (*lnrpc.ChannelPoint, error) {
}, nil
}

// parseTimeLockDelta is expected to get a uint16 type of timeLockDelta,
// which maximum value is MaxTimeLockDelta.
// parseTimeLockDelta is expected to get a uint16 type of timeLockDelta. Its
// maximum value is MaxTimeLockDelta.
func parseTimeLockDelta(timeLockDeltaStr string) (uint16, error) {
timeLockDeltaUnCheck, err := strconv.ParseUint(
timeLockDeltaStr, 10, 64,
)
timeLockDeltaUnCheck, err := strconv.ParseUint(timeLockDeltaStr, 10, 64)
if err != nil {
return 0, fmt.Errorf("failed to parse time_lock_delta: %s "+
"to uint64, err: %v", timeLockDeltaStr, err)
Expand Down
4 changes: 2 additions & 2 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6948,8 +6948,8 @@ func (r *rpcServer) UpdateChannelPolicy(ctx context.Context,
MinHTLC: minHtlc,
}

rpcsLog.Debugf("[updatechanpolicy] updating channel policy base_fee=%v, "+
"rate_fixed=%v, time_lock_delta: %v, "+
rpcsLog.Debugf("[updatechanpolicy] updating channel policy "+
"base_fee=%v, rate_fixed=%v, time_lock_delta: %v, "+
"min_htlc=%v, max_htlc=%v, targets=%v",
req.BaseFeeMsat, feeRateFixed, req.TimeLockDelta,
minHtlc, maxHtlc,
Expand Down
Loading