Merge pull request #847 from cosmos/cwgoes/misc-cli-fixes

Address PR comments on #812
This commit is contained in:
Rigel 2018-04-11 12:32:37 -04:00 committed by GitHub
commit 8aaf1b659e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View File

@ -1,10 +1,8 @@
package context
import (
"encoding/json"
"fmt"
"github.com/spf13/viper"
"io/ioutil"
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
rpcclient "github.com/tendermint/tendermint/rpc/client"
@ -48,13 +46,7 @@ func defaultChainID() (string, error) {
if err != nil {
return "", err
}
genesisFile := cfg.GenesisFile()
bz, err := ioutil.ReadFile(genesisFile)
if err != nil {
return "", err
}
var doc tmtypes.GenesisDoc
err = json.Unmarshal(bz, &doc)
doc, err := tmtypes.GenesisDocFromFile(cfg.GenesisFile())
if err != nil {
return "", err
}

View File

@ -24,7 +24,7 @@ func (c CoreContext) WithChainID(chainID string) CoreContext {
return c
}
// WithHeight - eturn a copy of the context with an updated height
// WithHeight - return a copy of the context with an updated height
func (c CoreContext) WithHeight(height int64) CoreContext {
c.Height = height
return c