[#81] cmd/neofs-cli: Use hex encoding of node's public key

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-06 16:23:31 +03:00 committed by Alex Vanin
parent 25398262fc
commit 0021f1cc5f

View file

@ -3,10 +3,10 @@ package cmd
import ( import (
"bytes" "bytes"
"context" "context"
"encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-api-go/pkg/netmap"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@ -96,7 +96,7 @@ func prettyPrintNodeInfo(i *netmap.NodeInfo, jsonEncoding bool) {
return return
} }
fmt.Println("key:", base58.Encode(i.PublicKey())) fmt.Println("key:", hex.EncodeToString(i.PublicKey()))
fmt.Println("address:", i.Address()) fmt.Println("address:", i.Address())
fmt.Println("state:", i.State()) fmt.Println("state:", i.State())