From 166875e927687306f06672768209ce2cd21e902d Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Tue, 11 Jul 2023 16:38:14 +0200 Subject: [PATCH] fix: use same source of now (#1032) --- config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 131d205070..9d528169c3 100644 --- a/config/config.go +++ b/config/config.go @@ -8,6 +8,8 @@ import ( "os" "path/filepath" "time" + + tmtime "github.com/tendermint/tendermint/types/time" ) const ( @@ -1030,7 +1032,7 @@ func (cfg *ConsensusConfig) Precommit(round int32) time.Duration { // NextStartTime adds the TargetHeightDuration to the provided starting time. func (cfg *ConsensusConfig) NextStartTime(t time.Time) time.Time { newStartTime := t.Add(cfg.TargetHeightDuration) - now := time.Now() + now := tmtime.Now() if newStartTime.Before(now) { return now }