diff --git a/modules/service/keeper/invocation.go b/modules/service/keeper/invocation.go index fb0c5a75..50cbac69 100644 --- a/modules/service/keeper/invocation.go +++ b/modules/service/keeper/invocation.go @@ -236,15 +236,13 @@ func (k Keeper) UpdateRequestContext( repeatedFreq = requestContext.RepeatedFrequency } - if requestContext.Repeated { - if repeatedFreq < uint64(timeout) { - return errorsmod.Wrapf( - types.ErrInvalidRepeatedFreq, - "repeated frequency [%d] must not be less than the timeout [%d]", - repeatedFreq, - requestContext.Timeout, - ) - } + if requestContext.Repeated && repeatedFreq < uint64(timeout) { + return errorsmod.Wrapf( + types.ErrInvalidRepeatedFreq, + "repeated frequency [%d] must not be less than the timeout [%d]", + repeatedFreq, + requestContext.Timeout, + ) } if repeatedTotal >= 1 && repeatedTotal < int64(requestContext.BatchCounter) { diff --git a/modules/service/simulation/operations.go b/modules/service/simulation/operations.go index b6645846..5ee0e991 100644 --- a/modules/service/simulation/operations.go +++ b/modules/service/simulation/operations.go @@ -1496,10 +1496,6 @@ func SimulateMsgUpdateRequestContext( timeout := r.Int63n(k.MaxRequestTimeout(ctx)) repeatedFrequency := uint64(0) repeatedTotal := int64(0) - //if requestContext.Repeated { - // repeatedFrequency = requestContext.RepeatedFrequency - // repeatedTotal = int64(repeatedTotal) - //} msg := types.NewMsgUpdateRequestContext( requestContextId.String(),