multi: add a rpc endpoint to track the recovery process

This commit is contained in:
yyforyongyu
2020-06-09 14:47:17 +08:00
parent c1ef5bb908
commit 987edc9d81
17 changed files with 1182 additions and 613 deletions

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",