remove key.json from basecoin init
This commit is contained in:
parent
af8f858ec2
commit
ace0e4cf78
|
@ -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"
|
||||
}
|
||||
}`
|
||||
|
|
Loading…
Reference in New Issue