From 18c48f88ceb656d292455404572b0d5c3a06e2ec Mon Sep 17 00:00:00 2001 From: Gjermund Garaba Date: Thu, 19 Dec 2024 19:39:49 +0100 Subject: [PATCH] moved some comments around and disabled forwarding --- modules/apps/transfer/v2/ibc_module.go | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/apps/transfer/v2/ibc_module.go b/modules/apps/transfer/v2/ibc_module.go index 6b2a1f0d5f3..f0783e7317d 100644 --- a/modules/apps/transfer/v2/ibc_module.go +++ b/modules/apps/transfer/v2/ibc_module.go @@ -103,23 +103,26 @@ func (im *IBCModule) OnRecvPacket(ctx context.Context, sourceChannel string, des im.keeper.Logger(ctx).Info("successfully handled ICS-20 packet", "sequence", sequence) - // TODO: forwarding - // if data.HasForwarding() { - // // we are now sending from the forward escrow address to the final receiver address. - // TODO: inside this version of the function, we should fetch the packet that was stored in IBC core in order to set it for forwarding. - // if err := k.forwardPacket(ctx, data, packet, receivedCoins); err != nil { - // return err - // } - // } - // TODO: telemetry // telemetry.ReportOnRecvPacket(packet, data.Tokens) if data.HasForwarding() { - // NOTE: acknowledgement will be written asynchronously + // we are now sending from the forward escrow address to the final receiver address. + ack = channeltypes.NewErrorAcknowledgement(fmt.Errorf("forwarding not yet supported")) return types.RecvPacketResult{ - Status: types.PacketStatus_Async, + Status: types.PacketStatus_Failure, + Acknowledgement: ack.Acknowledgement(), } + // TODO: handle forwarding + // TODO: inside this version of the function, we should fetch the packet that was stored in IBC core in order to set it for forwarding. + // if err := k.forwardPacket(ctx, data, packet, receivedCoins); err != nil { + // return err + // } + + // NOTE: acknowledgement will be written asynchronously + // return types.RecvPacketResult{ + // Status: types.PacketStatus_Async, + // } } // NOTE: acknowledgement will be written synchronously during IBC handler execution.