[#425] cli: Support latest changes from API library

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-03-15 14:23:04 +03:00 committed by Alex Vanin
parent e6cde0ab28
commit 6204ca8308
5 changed files with 43 additions and 50 deletions

View file

@ -56,12 +56,12 @@ var getEpochCmd = &cobra.Command{
return err
}
e, err := cli.Epoch(context.Background(), globalCallOptions()...)
netInfo, err := cli.NetworkInfo(context.Background(), globalCallOptions()...)
if err != nil {
return fmt.Errorf("rpc error: %w", err)
}
fmt.Println(e)
fmt.Println(netInfo.CurrentEpoch())
return nil
},
@ -82,7 +82,7 @@ var localNodeInfoCmd = &cobra.Command{
return fmt.Errorf("rpc error: %w", err)
}
prettyPrintNodeInfo(nodeInfo, nodeInfoJSON)
prettyPrintNodeInfo(nodeInfo.NodeInfo(), nodeInfoJSON)
return nil
},
@ -105,12 +105,12 @@ var snapshotCmd = &cobra.Command{
return err
}
cli, err := getControlServiceClient()
cli, err := getSDKClient()
if err != nil {
return err
}
resp, err := cli.NetmapSnapshot(context.Background(), req)
resp, err := control.NetmapSnapshot(cli.Raw(), req)
if err != nil {
return err
}