Skip to content

Commit

Permalink
dbft: fix durationcheck warning
Browse files Browse the repository at this point in the history
dbft.go:703:18                               durationcheck  Multiplication of durations: `count * d.SecondsPerBlock`

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Sep 10, 2024
1 parent 9ba6bca commit 8bf51ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,9 +698,9 @@ func (d *DBFT[H]) changeTimer(delay time.Duration) {
d.Timer.Reset(d.BlockIndex, d.ViewNumber, delay)
}

func (d *DBFT[H]) extendTimer(count time.Duration) {
func (d *DBFT[H]) extendTimer(count int) {
if !d.CommitSent() && (!d.isAntiMEVExtensionEnabled() || !d.PreCommitSent()) && !d.ViewChanging() {
d.Timer.Extend(count * d.SecondsPerBlock / time.Duration(d.M()))
d.Timer.Extend(time.Duration(count) * d.SecondsPerBlock / time.Duration(d.M()))
}
}

Expand Down

0 comments on commit 8bf51ca

Please sign in to comment.