lncli: channel fee parameter for openchannel

This commit is contained in:
Slyghtning 2022-09-10 12:04:52 -04:00
parent 1e030c2d48
commit 2a90b2439a

View File

@ -104,6 +104,19 @@ var openChannelCommand = cli.Command{
Name: "local_amt",
Usage: "the number of satoshis the wallet should commit to the channel",
},
cli.Uint64Flag{
Name: "base_fee_msat",
Usage: "the base fee in milli-satoshis that will " +
"be charged for each forwarded HTLC, regardless " +
"of payment size",
},
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)",
},
cli.IntFlag{
Name: "push_amt",
Usage: "the number of satoshis to give the remote side " +
@ -328,6 +341,16 @@ func openChannel(ctx *cli.Context) error {
}
}
if ctx.IsSet("base_fee_msat") {
req.BaseFee = ctx.Uint64("base_fee_msat")
req.UseBaseFee = true
}
if ctx.IsSet("fee_rate_ppm") {
req.FeeRate = ctx.Uint64("fee_rate_ppm")
req.UseFeeRate = true
}
req.Private = ctx.Bool("private")
// Parse the channel type and map it to its RPC representation.