diff --git a/consensus/reactor.go b/consensus/reactor.go index b7129f45..6e9bf6cc 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -293,7 +293,9 @@ func (conR *ConsensusReactor) stepTransitionRoutine() { // when it is due. scheduleNextAction := func() { rs := conR.conS.GetRoundState() - _, _, roundDuration, _, elapsedRatio := calcRoundInfo(rs.StartTime) + round, roundStartTime, roundDuration, _, elapsedRatio := calcRoundInfo(rs.StartTime) + log.Debug("Called scheduleNextAction. round:%v roundStartTime:%v elapsedRatio:%v", + round, roundStartTime, elapsedRatio) go func() { switch rs.Step { case RoundStepStart: diff --git a/state/genesis.go b/state/genesis.go index e81106bb..417b2d85 100644 --- a/state/genesis.go +++ b/state/genesis.go @@ -39,6 +39,10 @@ func GenesisStateFromDoc(db db_.DB, genDoc *GenesisDoc) *State { func GenesisState(db db_.DB, genesisTime time.Time, accDets []*AccountDetail) *State { + if genesisTime.IsZero() { + genesisTime = time.Now() + } + // TODO: Use "uint64Codec" instead of BasicCodec accountDetails := merkle.NewIAVLTree(BasicCodec, AccountDetailCodec, defaultAccountDetailsCacheCapacity, db) validators := []*Validator{}