Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
avery committed Dec 17, 2024
1 parent 885e3be commit 0ad41be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 7 additions & 9 deletions modules/service/keeper/invocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions modules/service/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0ad41be

Please sign in to comment.