From ace0e4cf7828618e0dbde74de37a5e4233825664 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Sat, 22 Jul 2017 09:56:22 -0400 Subject: [PATCH] remove key.json from basecoin init --- cmd/basecoin/commands/init.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/cmd/basecoin/commands/init.go b/cmd/basecoin/commands/init.go index ac4520539..ec0d62435 100644 --- a/cmd/basecoin/commands/init.go +++ b/cmd/basecoin/commands/init.go @@ -4,7 +4,6 @@ import ( "fmt" "io/ioutil" "os" - "path" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -56,7 +55,6 @@ func initCmd(cmd *cobra.Command, args []string) error { // initalize basecoin genesisFile := cfg.GenesisFile() privValFile := cfg.PrivValidatorFile() - keyFile := path.Join(cfg.RootDir, "key.json") mod1, err := setupFile(genesisFile, GetGenesisJSON(viper.GetString(FlagChainID), userAddr), 0644) if err != nil { @@ -66,12 +64,8 @@ func initCmd(cmd *cobra.Command, args []string) error { if err != nil { return err } - mod3, err := setupFile(keyFile, KeyJSON, 0400) - if err != nil { - return err - } - if (mod1 + mod2 + mod3) > 0 { + if (mod1 + mod2) > 0 { msg := fmt.Sprintf("Initialized %s", cmd.Root().Name()) logger.Info(msg, "genesis", genesisFile, "priv_validator", privValFile) } else { @@ -130,16 +124,3 @@ func GetGenesisJSON(chainID, addr string) string { } }`, chainID, addr) } - -// KeyJSON - TODO: remove this once not needed for relay -var KeyJSON = `{ - "address": "1B1BE55F969F54064628A63B9559E7C21C925165", - "priv_key": { - "type": "ed25519", - "data": "C70D6934B4F55F1B7BC33B56B9CA8A2061384AFC19E91E44B40C4BBA182953D1619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - }, - "pub_key": { - "type": "ed25519", - "data": "619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - } -}`