mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 18:51:39 +00:00
Add argument to ParseGenesis to use in light-client
This commit is contained in:
@ -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) {
|
func ParseGenesisFile(genDocFile string) (*types.GenesisDoc, error) {
|
||||||
genDocFile := config.GenesisFile()
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user