From ac2d3a917e5cb775ba7dbf624269d7f41e301333 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 8 May 2018 12:04:20 +0400 Subject: [PATCH] set GenesisTime to now during `tendermint init` --- cmd/tendermint/commands/init.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index 32559fa5c..430a6c7c9 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -1,6 +1,8 @@ package commands import ( + "time" + "github.com/spf13/cobra" cfg "github.com/tendermint/tendermint/config" @@ -50,7 +52,8 @@ func initFilesWithConfig(config *cfg.Config) error { logger.Info("Found genesis file", "path", genFile) } else { genDoc := types.GenesisDoc{ - ChainID: cmn.Fmt("test-chain-%v", cmn.RandStr(6)), + ChainID: cmn.Fmt("test-chain-%v", cmn.RandStr(6)), + GenesisTime: time.Now(), } genDoc.Validators = []types.GenesisValidator{{ PubKey: pv.GetPubKey(),