Skip to content

Commit

Permalink
fix: reorder if and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed May 16, 2024
1 parent cff8305 commit 16ca629
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/core/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ func (rrd RedundantRelayDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
response *channeltypes.MsgRecvPacketResponse
err error
)
if ctx.IsCheckTx() {
response, err = rrd.recvPacketCheckTx(ctx, msg)
} else {
// when we are in ReCheckTx mode, ctx.IsCheckTx() will also return true
// there we must start the if statement on ctx.IsReCheckTx() to correctly
// determine which mode we are in
if ctx.IsReCheckTx() {
response, err = rrd.k.RecvPacket(ctx, msg)
} else {
response, err = rrd.recvPacketCheckTx(ctx, msg)
}
if err != nil {
return ctx, err
Expand Down

0 comments on commit 16ca629

Please sign in to comment.