Skip to content

Commit 16ca629

Browse files
committed
fix: reorder if and add comment
1 parent cff8305 commit 16ca629

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/core/ante/ante.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ func (rrd RedundantRelayDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
3636
response *channeltypes.MsgRecvPacketResponse
3737
err error
3838
)
39-
if ctx.IsCheckTx() {
40-
response, err = rrd.recvPacketCheckTx(ctx, msg)
41-
} else {
39+
// when we are in ReCheckTx mode, ctx.IsCheckTx() will also return true
40+
// there we must start the if statement on ctx.IsReCheckTx() to correctly
41+
// determine which mode we are in
42+
if ctx.IsReCheckTx() {
4243
response, err = rrd.k.RecvPacket(ctx, msg)
44+
} else {
45+
response, err = rrd.recvPacketCheckTx(ctx, msg)
4346
}
4447
if err != nil {
4548
return ctx, err

0 commit comments

Comments
 (0)