mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +01:00
lncli: add show_inflight flag
This commit is contained in:
parent
af4abe7d58
commit
3ed3c90efe
1 changed files with 13 additions and 1 deletions
|
@ -46,6 +46,12 @@ var (
|
|||
"<hex_value>,.. For example: --data 3438382=0a21ff. " +
|
||||
"Custom record ids start from 65536.",
|
||||
}
|
||||
|
||||
showInflightFlag = cli.BoolFlag{
|
||||
Name: "show_inflight",
|
||||
Usage: "if set, intermediate payment state updates will be " +
|
||||
"displayed",
|
||||
}
|
||||
)
|
||||
|
||||
// paymentFlags returns common flags for sendpayment and payinvoice.
|
||||
|
@ -82,7 +88,7 @@ func paymentFlags() []cli.Flag {
|
|||
Name: "allow_self_payment",
|
||||
Usage: "allow sending a circular payment to self",
|
||||
},
|
||||
dataFlag,
|
||||
dataFlag, showInflightFlag,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,6 +388,8 @@ func sendPaymentRequest(ctx *cli.Context,
|
|||
|
||||
req.FeeLimitSat = feeLimit
|
||||
|
||||
showInflight := ctx.Bool(showInflightFlag.Name)
|
||||
|
||||
stream, err := routerClient.SendPayment(context.Background(), req)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -405,6 +413,10 @@ func sendPaymentRequest(ctx *cli.Context,
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
if showInflight {
|
||||
printRespJSON(status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue