Merge pull request #847 from cosmos/cwgoes/misc-cli-fixes
Address PR comments on #812
This commit is contained in:
commit
8aaf1b659e
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue