Skip to content

Commit

Permalink
refactor isExpired
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Nov 19, 2024
1 parent 9e5c6fa commit f631e65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const (
)

func IsExpired(prev StatePeriod, cur StatePeriod) bool {
return cur-prev >= NumActiveEpochs
return cur >= prev+NumActiveEpochs // TODO(weiihann): deal with overflow
}

func StatePeriodFromBytes(b []byte) StatePeriod {
Expand Down

0 comments on commit f631e65

Please sign in to comment.