multi: add a rpc endpoint to track the recovery process

This commit is contained in:
yyforyongyu committed 2020-06-25 15:49:54 +08:00
1 parent c1ef5bb908
commit 987edc9d81
17 files changed
+1182 -613

No files matched your search

+21
View File
@@ -1729,6 +1729,27 @@ func getInfo(ctx *cli.Context) error {
return nil
}
var getRecoveryInfoCommand = cli.Command{
Name: "getrecoveryinfo",
Usage: "Display information about an ongoing recovery attempt.",
Action: actionDecorator(getRecoveryInfo),
}
func getRecoveryInfo(ctx *cli.Context) error {
ctxb := context.Background()
client, cleanUp := getClient(ctx)
defer cleanUp()
req := &lnrpc.GetRecoveryInfoRequest{}
resp, err := client.GetRecoveryInfo(ctxb, req)
if err != nil {
return err
}
printRespJSON(resp)
return nil
}
var pendingChannelsCommand = cli.Command{
Name: "pendingchannels",
Category: "Channels",
+1
View File
@@ -271,6 +271,7 @@ func main() {
walletBalanceCommand,
channelBalanceCommand,
getInfoCommand,
getRecoveryInfoCommand,
pendingChannelsCommand,
sendPaymentCommand,
payInvoiceCommand,