This commit is contained in:
rigelrozanski
2018-04-26 14:26:39 -04:00
parent d4c2d6fd4c
commit 246e4bdac3
12 changed files with 39 additions and 40 deletions
+1 -1
View File
@@ -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
View File
@@ -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)
}
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
+4
View File
@@ -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
-12
View File
@@ -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)
}