Address PR comments

This commit is contained in:
Christopher Goes
2018-04-11 17:48:15 +02:00
parent 5212ac02e4
commit 25d0fb593c
2 changed files with 2 additions and 10 deletions
+1 -9
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
}
+1 -1
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