Skip to content

Commit 64601a9

Browse files
committed
wallet lncli: fix bumpfee parsing bug.
1 parent acc5951 commit 64601a9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

cmd/lncli/walletrpc_active.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,24 @@ func bumpFee(ctx *cli.Context) error {
272272
client, cleanUp := getWalletClient(ctx)
273273
defer cleanUp()
274274

275+
// Parse immediate flag (force flag was deprecated).
276+
immediate := false
277+
switch {
278+
case ctx.IsSet("immediate") && ctx.IsSet("force"):
279+
return fmt.Errorf("cannot set immediate and force flag at " +
280+
"the same time")
281+
282+
case ctx.Bool("immediate"):
283+
immediate = true
284+
285+
case ctx.Bool("force"):
286+
immediate = true
287+
}
288+
275289
resp, err := client.BumpFee(ctxc, &walletrpc.BumpFeeRequest{
276290
Outpoint: protoOutPoint,
277291
TargetConf: uint32(ctx.Uint64("conf_target")),
278-
Immediate: ctx.Bool("force"),
292+
Immediate: immediate,
279293
Budget: ctx.Uint64("budget"),
280294
})
281295
if err != nil {

0 commit comments

Comments
 (0)