mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 18:22:25 +02:00
walletrpc: add new deadline-delta param to bumpfee rpc
Add new parameter deadline-delta to the bumpfee request and only allow it to be used when the budget value is used as well.
This commit is contained in:
@@ -268,9 +268,10 @@ var bumpFeeCommand = cli.Command{
|
||||
cli.Uint64Flag{
|
||||
Name: "conf_target",
|
||||
Usage: `
|
||||
The deadline in number of blocks that the input should be spent within.
|
||||
When not set, for new inputs, the default value (1008) is used; for
|
||||
exiting inputs, their current values will be retained.`,
|
||||
The conf target is the starting fee rate of the fee function expressed
|
||||
in number of blocks. So instead of using sat_per_vbyte the conf target
|
||||
can be specified and LND will query its fee estimator for the current
|
||||
fee rate for the given target.`,
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "sat_per_byte",
|
||||
@@ -307,6 +308,14 @@ var bumpFeeCommand = cli.Command{
|
||||
the budget for fee bumping; for existing inputs, their current budgets
|
||||
will be retained.`,
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "deadline_delta",
|
||||
Usage: `
|
||||
The deadline delta in number of blocks that this input should be spent
|
||||
within to bump the transaction. When specified also a budget value is
|
||||
required. When the deadline is reached, ALL the budget will be spent as
|
||||
fee.`,
|
||||
},
|
||||
},
|
||||
Action: actionDecorator(bumpFee),
|
||||
}
|
||||
@@ -344,11 +353,12 @@ func bumpFee(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
resp, err := client.BumpFee(ctxc, &walletrpc.BumpFeeRequest{
|
||||
Outpoint: protoOutPoint,
|
||||
TargetConf: uint32(ctx.Uint64("conf_target")),
|
||||
Immediate: immediate,
|
||||
Budget: ctx.Uint64("budget"),
|
||||
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
|
||||
Outpoint: protoOutPoint,
|
||||
TargetConf: uint32(ctx.Uint64("conf_target")),
|
||||
Immediate: immediate,
|
||||
Budget: ctx.Uint64("budget"),
|
||||
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
|
||||
DeadlineDelta: uint32(ctx.Uint64("deadline_delta")),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -377,9 +387,10 @@ var bumpCloseFeeCommand = cli.Command{
|
||||
cli.Uint64Flag{
|
||||
Name: "conf_target",
|
||||
Usage: `
|
||||
The deadline in number of blocks that the input should be spent within.
|
||||
When not set, for new inputs, the default value (1008) is used; for
|
||||
exiting inputs, their current values will be retained.`,
|
||||
The conf target is the starting fee rate of the fee function expressed
|
||||
in number of blocks. So instead of using sat_per_vbyte the conf target
|
||||
can be specified and LND will query its fee estimator for the current
|
||||
fee rate for the given target.`,
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "sat_per_byte",
|
||||
@@ -435,8 +446,17 @@ var bumpForceCloseFeeCommand = cli.Command{
|
||||
cli.Uint64Flag{
|
||||
Name: "conf_target",
|
||||
Usage: `
|
||||
The deadline in number of blocks that the anchor output should be spent
|
||||
within to bump the closing transaction.`,
|
||||
The conf target is the starting fee rate of the fee function expressed
|
||||
in number of blocks. So instead of using sat_per_vbyte the conf target
|
||||
can be specified and LND will query its fee estimator for the current
|
||||
fee rate for the given target.`,
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "deadline_delta",
|
||||
Usage: `
|
||||
The deadline delta in number of blocks that the anchor output should
|
||||
be spent within to bump the closing transaction. When the deadline is
|
||||
reached, ALL the budget will be spent as fees.`,
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "sat_per_byte",
|
||||
@@ -513,10 +533,11 @@ func bumpForceCloseFee(ctx *cli.Context) error {
|
||||
resp, err := walletClient.BumpForceCloseFee(
|
||||
ctxc, &walletrpc.BumpForceCloseFeeRequest{
|
||||
ChanPoint: rpcChannelPoint,
|
||||
DeadlineDelta: uint32(ctx.Uint64("conf_target")),
|
||||
Budget: ctx.Uint64("budget"),
|
||||
Immediate: immediate,
|
||||
StartingFeerate: ctx.Uint64("sat_per_vbyte"),
|
||||
TargetConf: uint32(ctx.Uint64("conf_target")),
|
||||
DeadlineDelta: uint32(ctx.Uint64("deadline_delta")),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user