|
|
@ -2,13 +2,11 @@ package commands |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"time" |
|
|
|
|
|
|
|
"github.com/spf13/cobra" |
|
|
|
|
|
|
|
"github.com/tendermint/tendermint/node" |
|
|
|
"github.com/tendermint/tendermint/types" |
|
|
|
cmn "github.com/tendermint/tmlibs/common" |
|
|
|
) |
|
|
|
|
|
|
|
var runNodeCmd = &cobra.Command{ |
|
|
@ -58,16 +56,7 @@ func AddNodeFlags(cmd *cobra.Command) { |
|
|
|
// with their custom priv validator and/or custom proxy.ClientCreator
|
|
|
|
func runNode(cmd *cobra.Command, args []string) error { |
|
|
|
|
|
|
|
// Wait until the genesis doc becomes available
|
|
|
|
// This is for Mintnet compatibility.
|
|
|
|
// TODO: If Mintnet gets deprecated or genesis_file is
|
|
|
|
// always available, remove.
|
|
|
|
genDocFile := config.GenesisFile() |
|
|
|
for !cmn.FileExists(genDocFile) { |
|
|
|
logger.Info(cmn.Fmt("Waiting for genesis file %v...", genDocFile)) |
|
|
|
time.Sleep(time.Second) |
|
|
|
} |
|
|
|
|
|
|
|
genDoc, err := types.GenesisDocFromFile(genDocFile) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|