Skip to content

Commit

Permalink
Make sure ICQ timeout is handled properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Segfaultd committed May 31, 2024
1 parent ae1fdd5 commit 44803c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x/millions/keeper/keeper_draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ func (k Keeper) OnQueryFreshPrizePoolCoinsOnRemoteZoneCompleted(ctx sdk.Context,
return nil, err
}
if draw.State != types.DrawState_IcqBalance {
// W're in the wrong state. If the state is already in error, and we are triggering because of an error, just ignore and don't return the error
// Because it's making the relayer trying to push again and again the same error
if isError && draw.State == types.DrawState_Failure {
return &draw, nil
}

// Otherwise we just process the error as expected
return &draw, errorsmod.Wrapf(types.ErrIllegalStateOperation, "state should be %s but is %s", types.DrawState_IcqBalance.String(), draw.State.String())
}

Expand Down

0 comments on commit 44803c8

Please sign in to comment.