Skip to content

Commit

Permalink
fix: use same source of now (#1032)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Jul 24, 2023
1 parent a5e6d3c commit 166875e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"os"
"path/filepath"
"time"

tmtime "github.com/tendermint/tendermint/types/time"
)

const (
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 166875e

Please sign in to comment.