fix: check correct time elpased condition (#853)

This commit is contained in:
Kevin Davis 2021-02-24 11:25:40 -07:00 committed by GitHub
parent 0e718d3510
commit 26e88c6177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -662,7 +662,7 @@ func (k Keeper) ZeroHardLiquidityProviderClaim(ctx sdk.Context, claim types.Hard
func CalculateTimeElapsed(start, end, blockTime time.Time, previousAccrualTime time.Time) sdk.Int {
if (end.Before(blockTime) &&
(end.Before(previousAccrualTime) || end.Equal(previousAccrualTime))) ||
(start.After(previousAccrualTime)) ||
(start.After(blockTime)) ||
(start.Equal(blockTime)) {
return sdk.ZeroInt()
}