Skip to content
Snippets Groups Projects
Commit b962c635 authored by Sean Young's avatar Sean Young
Browse files

Set chain name before calling templating code


Signed-off-by: default avatarSean Young <sean.young@monax.io>
parent 2c8ce766
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,13 @@ func Configure(output Output) func(cmd *cli.Cmd) { ...@@ -205,6 +205,13 @@ func Configure(output Output) func(cmd *cli.Cmd) {
conf.GenesisDoc = genesisDoc conf.GenesisDoc = genesisDoc
} }
if *chainNameOpt != "" {
if conf.GenesisDoc == nil {
output.Fatalf("Unable to set ChainName since no GenesisDoc/GenesisSpec provided.")
}
conf.GenesisDoc.ChainName = *chainNameOpt
}
if conf.GenesisDoc != nil { if conf.GenesisDoc != nil {
pkg.Config = conf.GenesisDoc pkg.Config = conf.GenesisDoc
...@@ -248,13 +255,6 @@ func Configure(output Output) func(cmd *cli.Cmd) { ...@@ -248,13 +255,6 @@ func Configure(output Output) func(cmd *cli.Cmd) {
} }
} }
if *chainNameOpt != "" {
if conf.GenesisDoc == nil {
output.Fatalf("Unable to set ChainName since no GenesisDoc/GenesisSpec provided.")
}
conf.GenesisDoc.ChainName = *chainNameOpt
}
if *separateGenesisDoc != "" { if *separateGenesisDoc != "" {
if conf.GenesisDoc == nil { if conf.GenesisDoc == nil {
output.Fatalf("Cannot write separate genesis doc since no GenesisDoc/GenesisSpec provided.") output.Fatalf("Cannot write separate genesis doc since no GenesisDoc/GenesisSpec provided.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment