renames
This commit is contained in:
+1
-1
@@ -122,7 +122,7 @@ func addAppStateToGenesis(cdc *wire.Codec, genesisConfigPath string, appState js
|
||||
|
||||
// GenAppParams creates the core parameters initialization. It takes in a
|
||||
// pubkey meant to represent the pubkey of the validator of this machine.
|
||||
type GenAppParams func(*wire.Codec, crypto.PubKey) (chainID string, validators []tmtypes.GenesisValidator, appState, message json.RawMessage, err error)
|
||||
type GenAppParams func(*wire.Codec, crypto.PubKey) (chainID string, validators []tmtypes.GenesisValidator, appState, cliPrint json.RawMessage, err error)
|
||||
|
||||
// Create one account with a whole bunch of mycoin in it
|
||||
func SimpleGenAppParams(cdc *wire.Codec, pubKey crypto.PubKey) (chainID string, validators []tmtypes.GenesisValidator, appState, cliPrint json.RawMessage, err error) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func TestInit(t *testing.T) {
|
||||
cfg, err := tcmd.ParseConfig()
|
||||
require.Nil(t, err)
|
||||
ctx := NewContext(cfg, logger)
|
||||
cmd := InitCmd(ctx, cdc, mock.GenAppState)
|
||||
cmd := InitCmd(ctx, cdc, mock.GenAppParams)
|
||||
err = cmd.RunE(nil, nil)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func TestStartStandAlone(t *testing.T) {
|
||||
cfg, err := tcmd.ParseConfig()
|
||||
require.Nil(t, err)
|
||||
ctx := NewContext(cfg, logger)
|
||||
initCmd := InitCmd(ctx, cdc, mock.GenAppState)
|
||||
initCmd := InitCmd(ctx, cdc, mock.GenAppParams)
|
||||
err = initCmd.RunE(nil, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestStartWithTendermint(t *testing.T) {
|
||||
cfg, err := tcmd.ParseConfig()
|
||||
require.Nil(t, err)
|
||||
ctx := NewContext(cfg, logger)
|
||||
initCmd := InitCmd(ctx, cdc, mock.GenAppState)
|
||||
initCmd := InitCmd(ctx, cdc, mock.GenAppParams)
|
||||
err = initCmd.RunE(nil, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ func setupViper(t *testing.T) func() {
|
||||
|
||||
//// init server
|
||||
//ctx := NewContext(cfg, log.NewNopLogger())
|
||||
//initCmd := InitCmd(ctx, cdc, mock.GenAppState)
|
||||
//initCmd := InitCmd(ctx, cdc, mock.GenAppParams)
|
||||
//err = initCmd.RunE(nil, nil)
|
||||
//require.NoError(t, err)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/wire"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@@ -43,6 +44,9 @@ func ShowValidatorCmd(ctx *Context) *cobra.Command {
|
||||
pubKey := privValidator.PubKey
|
||||
|
||||
if viper.GetBool(flagJSON) {
|
||||
|
||||
cdc := wire.NewCodec()
|
||||
wire.RegisterCrypto(cdc)
|
||||
pubKeyJSONBytes, err := cdc.MarshalJSON(pubKey)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/wire"
|
||||
)
|
||||
|
||||
var cdc *wire.Codec
|
||||
|
||||
func init() {
|
||||
cdc = wire.NewCodec()
|
||||
wire.RegisterCrypto(cdc)
|
||||
}
|
||||
Reference in New Issue
Block a user