Skip to content

Commit 088c822

Browse files
fix: enable noop error in v2 timeout (#7903)
1 parent 0d58d59 commit 088c822

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

modules/core/04-channel/v2/keeper/msg_server.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,7 @@ func (k *Keeper) Timeout(ctx context.Context, timeout *types.MsgTimeout) (*types
198198
}
199199

200200
cacheCtx, writeFn := sdkCtx.CacheContext()
201-
if err := k.timeoutPacket(cacheCtx, timeout.Packet, timeout.ProofUnreceived, timeout.ProofHeight); err != nil {
202-
sdkCtx.Logger().Error("Timeout packet failed", "source-client", timeout.Packet.SourceClient, "destination-client", timeout.Packet.DestinationClient, "error", errorsmod.Wrap(err, "timeout packet failed"))
203-
return nil, errorsmod.Wrapf(err, "timeout packet failed for source id: %s and destination id: %s", timeout.Packet.SourceClient, timeout.Packet.DestinationClient)
204-
}
201+
err = k.timeoutPacket(cacheCtx, timeout.Packet, timeout.ProofUnreceived, timeout.ProofHeight)
205202

206203
switch err {
207204
case nil:

modules/core/04-channel/v2/keeper/msg_server_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func (suite *KeeperTestSuite) TestMsgTimeout() {
392392
malleate: func() {},
393393
},
394394
{
395-
name: "failure: no-op",
395+
name: "success: no-op",
396396
malleate: func() {
397397
suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.DeletePacketCommitment(suite.chainA.GetContext(), packet.SourceClient, packet.Sequence)
398398

@@ -402,7 +402,6 @@ func (suite *KeeperTestSuite) TestMsgTimeout() {
402402
return mock.MockApplicationCallbackError
403403
}
404404
},
405-
expError: types.ErrNoOpMsg,
406405
},
407406
{
408407
name: "failure: callback fails",

0 commit comments

Comments
 (0)