Merge pull request #8685 from ziggie1984/fix-bumpfee-immediate

fix lncli bumpfee flag parsing
This commit is contained in:
Oliver Gugger 2024-04-25 10:17:05 +02:00 committed by GitHub
commit dcd8e16376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View File

@ -272,10 +272,24 @@ func bumpFee(ctx *cli.Context) error {
client, cleanUp := getWalletClient(ctx) client, cleanUp := getWalletClient(ctx)
defer cleanUp() defer cleanUp()
// Parse immediate flag (force flag was deprecated).
immediate := false
switch {
case ctx.IsSet("immediate") && ctx.IsSet("force"):
return fmt.Errorf("cannot set immediate and force flag at " +
"the same time")
case ctx.Bool("immediate"):
immediate = true
case ctx.Bool("force"):
immediate = true
}
resp, err := client.BumpFee(ctxc, &walletrpc.BumpFeeRequest{ resp, err := client.BumpFee(ctxc, &walletrpc.BumpFeeRequest{
Outpoint: protoOutPoint, Outpoint: protoOutPoint,
TargetConf: uint32(ctx.Uint64("conf_target")), TargetConf: uint32(ctx.Uint64("conf_target")),
Immediate: ctx.Bool("force"), Immediate: immediate,
Budget: ctx.Uint64("budget"), Budget: ctx.Uint64("budget"),
}) })
if err != nil { if err != nil {

View File

@ -127,6 +127,9 @@
utxos which are unconfirmed and originated from the sweeper subsystem are not utxos which are unconfirmed and originated from the sweeper subsystem are not
selected because they bear the risk of being replaced (BIP 125 RBF). selected because they bear the risk of being replaced (BIP 125 RBF).
* [Fixed](https://github.com/lightningnetwork/lnd/pull/8685) lncli "bumpfee"
parsing of the immediate/force flag.
# New Features # New Features
## Functional Enhancements ## Functional Enhancements