Add argument to ParseGenesis to use in light-client

This commit is contained in:
Ethan Frey 2017-06-26 16:56:51 +02:00
parent 6b38abd57b
commit 10982f4d8f
1 changed files with 2 additions and 3 deletions

View File

@ -49,8 +49,7 @@ func AddNodeFlags(cmd *cobra.Command) {
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)
if err != nil {
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)
}
genDoc, err := ParseGenesisFile()
genDoc, err := ParseGenesisFile(genDocFile)
if err != nil {
return err
}