diff --git a/epoch.go b/epoch.go index 0a2c184..6ec6602 100644 --- a/epoch.go +++ b/epoch.go @@ -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 {