Skip to content

Commit

Permalink
Merge pull request #847 from cosmos/cwgoes/misc-cli-fixes
Browse files Browse the repository at this point in the history
Address PR comments on #812
  • Loading branch information
rigelrozanski authored Apr 11, 2018
2 parents 5212ac0 + 25d0fb5 commit 8aaf1b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions client/context/viper.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion client/core/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8aaf1b6

Please sign in to comment.