Lots of updates to use new go-crypto / json style

This commit is contained in:
Ethan Frey
2017-03-21 22:46:15 +01:00
committed by Ethan Buchman
parent 516e78ea54
commit e325ffc681
7 changed files with 41 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/spf13/cobra"
"github.com/tendermint/go-wire"
data "github.com/tendermint/go-data"
"github.com/tendermint/tendermint/types"
)
@@ -22,5 +22,6 @@ func init() {
func showValidator(cmd *cobra.Command, args []string) {
privValidatorFile := config.GetString("priv_validator_file")
privValidator := types.LoadOrGenPrivValidator(privValidatorFile)
fmt.Println(string(wire.JSONBytesPretty(privValidator.PubKey)))
pubKeyJSONBytes, _ := data.ToJSON(privValidator.PubKey)
fmt.Println(string(pubKeyJSONBytes))
}