cmd: dont wait for genesis. closes #562

This commit is contained in:
Ethan Buchman 2017-09-06 01:57:21 -04:00
parent 399fb9aa70
commit aa78fc14b5
1 changed files with 0 additions and 11 deletions

View File

@ -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