Browse Source

Add argument to ParseGenesis to use in light-client

pull/561/head
Ethan Frey 8 years ago
parent
commit
10982f4d8f
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      cmd/tendermint/commands/run_node.go

+ 2
- 3
cmd/tendermint/commands/run_node.go View File

@ -49,8 +49,7 @@ func AddNodeFlags(cmd *cobra.Command) {
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable Peer-Exchange (dev feature)") cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable Peer-Exchange (dev feature)")
} }
func ParseGenesisFile() (*types.GenesisDoc, error) {
genDocFile := config.GenesisFile()
func ParseGenesisFile(genDocFile string) (*types.GenesisDoc, error) {
jsonBlob, err := ioutil.ReadFile(genDocFile) jsonBlob, err := ioutil.ReadFile(genDocFile)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "Couldn't read GenesisDoc file") return nil, errors.Wrap(err, "Couldn't read GenesisDoc file")
@ -83,7 +82,7 @@ func runNode(cmd *cobra.Command, args []string) error {
time.Sleep(time.Second) time.Sleep(time.Second)
} }
genDoc, err := ParseGenesisFile()
genDoc, err := ParseGenesisFile(genDocFile)
if err != nil { if err != nil {
return err return err
} }


Loading…
Cancel
Save