-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Make BumpFee RPC user inputs more stricter. #9470
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also update the docs for
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very good point, updated the bumpclosefee and bumpforceclose RPCs as well.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also added the conf_target (target_conf) to the bumpforceclose RPC |
||
| 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.`, | ||
|
ziggie1984 marked this conversation as resolved.
|
||
| }, | ||
| 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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.