Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: moving fn definition to bottom of file and switching params #1232

Merged
merged 6 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
### State Machine Breaking

### Improvements

* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`.
* (modules/core/04-channel) [\#1232](https://github.com/cosmos/ibc-go/pull/1232) Updating params on `NewPacketId` and moving to bottom of file.

### Features
* (modules/apps/29-fee) [\#1229](https://github.com/cosmos/ibc-go/pull/1229) Adding CLI commands for getting all unrelayed incentivized packets and packet by packet-id.
Expand Down
6 changes: 3 additions & 3 deletions modules/apps/29-fee/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func GetCmdTotalRecvFees() *cobra.Command {
return err
}

packetID := channeltypes.NewPacketId(channelID, portID, seq)
packetID := channeltypes.NewPacketId(portID, channelID, seq)

if err := packetID.Validate(); err != nil {
return err
Expand Down Expand Up @@ -166,7 +166,7 @@ func GetCmdTotalAckFees() *cobra.Command {
return err
}

packetID := channeltypes.NewPacketId(channelID, portID, seq)
packetID := channeltypes.NewPacketId(portID, channelID, seq)

if err := packetID.Validate(); err != nil {
return err
Expand Down Expand Up @@ -212,7 +212,7 @@ func GetCmdTotalTimeoutFees() *cobra.Command {
return err
}

packetID := channeltypes.NewPacketId(channelID, portID, seq)
packetID := channeltypes.NewPacketId(portID, channelID, seq)

if err := packetID.Validate(); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewPayPacketFeeAsyncTxCmd() *cobra.Command {
return err
}

packetID := channeltypes.NewPacketId(args[1], args[0], seq)
packetID := channeltypes.NewPacketId(args[0], args[1], seq)

recvFeeStr, err := cmd.Flags().GetString(flagRecvFee)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions modules/apps/29-fee/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (im IBCModule) OnRecvPacket(

// incase of async aknowledgement (ack == nil) store the relayer address for use later during async WriteAcknowledgement
if ack == nil {
im.keeper.SetRelayerAddressForAsyncAck(ctx, channeltypes.NewPacketId(packet.GetDestChannel(), packet.GetDestPort(), packet.GetSequence()), relayer.String())
im.keeper.SetRelayerAddressForAsyncAck(ctx, channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()), relayer.String())
return nil
}

Expand All @@ -231,7 +231,7 @@ func (im IBCModule) OnAcknowledgementPacket(
return sdkerrors.Wrapf(err, "cannot unmarshal ICS-29 incentivized packet acknowledgement: %v", ack)
}

packetID := channeltypes.NewPacketId(packet.SourceChannel, packet.SourcePort, packet.Sequence)
packetID := channeltypes.NewPacketId(packet.SourcePort, packet.SourceChannel, packet.Sequence)
feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID)
if !found {
// return underlying callback if no fee found for given packetID
Expand All @@ -258,7 +258,7 @@ func (im IBCModule) OnTimeoutPacket(
return im.app.OnTimeoutPacket(ctx, packet, relayer)
}

packetID := channeltypes.NewPacketId(packet.SourceChannel, packet.SourcePort, packet.Sequence)
packetID := channeltypes.NewPacketId(packet.SourcePort, packet.SourceChannel, packet.Sequence)
feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID)
if !found {
// return underlying callback if fee not found for given packetID
Expand Down
22 changes: 11 additions & 11 deletions modules/apps/29-fee/ibc_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ func (suite *FeeTestSuite) TestOnChanCloseInit() {
"success",
func(suite *FeeTestSuite) {
packetID := channeltypes.NewPacketId(
suite.path.EndpointA.ChannelID,
suite.path.EndpointA.ChannelConfig.PortID,
suite.path.EndpointA.ChannelID,
1,
)
refundAcc := suite.chainA.SenderAccount.GetAddress()
Expand All @@ -316,11 +316,11 @@ func (suite *FeeTestSuite) TestOnChanCloseInit() {
{
"module account balance insufficient",
func(suite *FeeTestSuite) {
packetID := channeltypes.PacketId{
PortId: suite.path.EndpointA.ChannelConfig.PortID,
ChannelId: suite.path.EndpointA.ChannelID,
Sequence: 1,
}
packetID := channeltypes.NewPacketId(
suite.path.EndpointA.ChannelConfig.PortID,
suite.path.EndpointA.ChannelID,
1,
)
refundAcc := suite.chainA.SenderAccount.GetAddress()
packetFee := types.NewPacketFee(types.Fee{validCoins, validCoins2, validCoins3}, refundAcc.String(), []string{})
err := suite.chainA.GetSimApp().IBCFeeKeeper.EscrowPacketFee(suite.chainA.GetContext(), packetID, packetFee)
Expand Down Expand Up @@ -537,7 +537,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() {

case tc.forwardRelayer && result == nil:
suite.Require().Equal(nil, result)
packetID := channeltypes.NewPacketId(packet.GetDestChannel(), packet.GetDestPort(), packet.GetSequence())
packetID := channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence())

// retrieve the forward relayer that was stored in `onRecvPacket`
relayer, _ := suite.chainB.GetSimApp().IBCFeeKeeper.GetRelayerAddressForAsyncAck(suite.chainB.GetContext(), packetID)
Expand Down Expand Up @@ -580,7 +580,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() {
{
"no op success without a packet fee",
func() {
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, suite.chainA.SenderAccount.GetSequence())
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetSequence())
suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID)

ack = types.IncentivizedAcknowledgement{
Expand Down Expand Up @@ -645,7 +645,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() {
suite.Require().True(ok)

// escrow the packet fee
packetID := channeltypes.NewPacketId(packet.GetSourceChannel(), packet.GetSourcePort(), packet.GetSequence())
packetID := channeltypes.NewPacketId(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence())
packetFee = types.NewPacketFee(
types.Fee{
RecvFee: validCoins,
Expand Down Expand Up @@ -728,7 +728,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() {
"no op if identified packet fee doesn't exist",
func() {
// delete packet fee
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, suite.chainA.SenderAccount.GetSequence())
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetSequence())
suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID)

expectedBalance = originalBalance
Expand Down Expand Up @@ -762,7 +762,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() {
cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module)
suite.Require().True(ok)

packetID := channeltypes.NewPacketId(packet.GetSourceChannel(), packet.GetSourcePort(), packet.GetSequence())
packetID := channeltypes.NewPacketId(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence())

// must be explicitly changed
relayerAddr = suite.chainB.SenderAccount.GetAddress()
Expand Down
12 changes: 6 additions & 6 deletions modules/apps/29-fee/keeper/escrow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) TestEscrowPacketFee() {
receiveFee = defaultReceiveFee
ackFee = defaultAckFee
timeoutFee = defaultTimeoutFee
packetID = channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, uint64(1))
packetID = channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1))

tc.malleate()
fee := types.Fee{
Expand Down Expand Up @@ -161,7 +161,7 @@ func (suite *KeeperTestSuite) TestDistributeFee() {
reverseRelayer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())
forwardRelayer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String()

packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, validSeq)
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, validSeq)
fee := types.Fee{
RecvFee: defaultReceiveFee,
AckFee: defaultAckFee,
Expand Down Expand Up @@ -221,8 +221,8 @@ func (suite *KeeperTestSuite) TestDistributeTimeoutFee() {
timeoutRelayer := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())

packetID := channeltypes.NewPacketId(
suite.path.EndpointA.ChannelID,
suite.path.EndpointA.ChannelConfig.PortID,
suite.path.EndpointA.ChannelID,
1,
)

Expand Down Expand Up @@ -271,7 +271,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() {
prevBal := suite.chainA.GetSimApp().BankKeeper.GetAllBalances(suite.chainA.GetContext(), refundAcc)

for i := 0; i < 5; i++ {
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, uint64(i))
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(i))
fee := types.Fee{
RecvFee: defaultReceiveFee,
AckFee: defaultAckFee,
Expand All @@ -285,7 +285,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() {
}

// send a packet over a different channel to ensure this fee is not refunded
packetID := channeltypes.NewPacketId("channel-1", ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, "channel-1", 1)
fee := types.Fee{
RecvFee: defaultReceiveFee,
AckFee: defaultAckFee,
Expand All @@ -306,7 +306,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannel() {
suite.Require().Equal(prevBal, afterBal.Add(fee.RecvFee...).Add(fee.AckFee...).Add(fee.TimeoutFee...), "refund account not back to original balance after refunding all tokens")

// create escrow and then change module account balance to cause error on refund
packetID = channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, uint64(6))
packetID = channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(6))

packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{})
err = suite.chainA.GetSimApp().IBCFeeKeeper.EscrowPacketFee(suite.chainA.GetContext(), packetID, packetFee)
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/29-fee/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func (suite *KeeperTestSuite) TestInitGenesis() {
// build PacketId & Fee
refundAcc := suite.chainA.SenderAccount.GetAddress()
packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)
fee := types.Fee{
RecvFee: defaultReceiveFee,
AckFee: defaultAckFee,
Expand Down Expand Up @@ -71,7 +71,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() {

// setup & escrow the packet fee
refundAcc := suite.chainA.SenderAccount.GetAddress()
packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)
fee := types.Fee{
RecvFee: defaultReceiveFee,
AckFee: defaultAckFee,
Expand Down
24 changes: 12 additions & 12 deletions modules/apps/29-fee/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() {

for i := 0; i < 3; i++ {
// escrow packet fees for three different packets
packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, uint64(i+1))
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, uint64(i+1))
suite.chainA.GetSimApp().IBCFeeKeeper.EscrowPacketFee(suite.chainA.GetContext(), packetID, packetFee)

expectedPackets = append(expectedPackets, types.NewIdentifiedPacketFees(packetID, []types.PacketFee{packetFee}))
Expand Down Expand Up @@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() {
"fees not found for packet id",
func() {
req = &types.QueryIncentivizedPacketRequest{
PacketId: channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 100),
PacketId: channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100),
QueryHeight: 0,
}
},
Expand All @@ -112,7 +112,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() {

suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID)

packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)
fee := types.NewFee(defaultReceiveFee, defaultAckFee, defaultTimeoutFee)
packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil))

Expand Down Expand Up @@ -210,9 +210,9 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacketsForChannel() {
packetFee := types.NewPacketFee(fee, refundAcc.String(), nil)
packetFees := types.NewPacketFees([]types.PacketFee{packetFee, packetFee, packetFee})

identifiedFees1 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1), packetFees.PacketFees)
identifiedFees2 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 2), packetFees.PacketFees)
identifiedFees3 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 3), packetFees.PacketFees)
identifiedFees1 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1), packetFees.PacketFees)
identifiedFees2 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 2), packetFees.PacketFees)
identifiedFees3 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 3), packetFees.PacketFees)

expIdentifiedPacketFees = append(expIdentifiedPacketFees, &identifiedFees1, &identifiedFees2, &identifiedFees3)

Expand Down Expand Up @@ -255,7 +255,7 @@ func (suite *KeeperTestSuite) TestQueryTotalRecvFees() {
{
"packet not found",
func() {
req.PacketId = channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 100)
req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100)
},
false,
},
Expand All @@ -267,7 +267,7 @@ func (suite *KeeperTestSuite) TestQueryTotalRecvFees() {

suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID)

packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)

fee := types.NewFee(defaultReceiveFee, defaultAckFee, defaultTimeoutFee)
packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil))
Expand Down Expand Up @@ -319,7 +319,7 @@ func (suite *KeeperTestSuite) TestQueryTotalAckFees() {
{
"packet not found",
func() {
req.PacketId = channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 100)
req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100)
},
false,
},
Expand All @@ -331,7 +331,7 @@ func (suite *KeeperTestSuite) TestQueryTotalAckFees() {

suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID)

packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)

fee := types.NewFee(defaultReceiveFee, defaultAckFee, defaultTimeoutFee)
packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil))
Expand Down Expand Up @@ -383,7 +383,7 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() {
{
"packet not found",
func() {
req.PacketId = channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 100)
req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100)
},
false,
},
Expand All @@ -395,7 +395,7 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() {

suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID)

packetID := channeltypes.NewPacketId(ibctesting.FirstChannelID, ibctesting.MockFeePort, 1)
packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1)

fee := types.NewFee(defaultReceiveFee, defaultAckFee, defaultTimeoutFee)
packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil))
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/29-fee/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (suite *KeeperTestSuite) TestFeesInEscrow() {
suite.coordinator.Setup(suite.path)

// escrow five fees for packet sequence 1
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, 1)
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1)
fee := types.NewFee(defaultReceiveFee, defaultAckFee, defaultTimeoutFee)

for i := 1; i < 6; i++ {
Expand Down Expand Up @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) TestGetAllIdentifiedPacketFees() {

// escrow a fee
refundAcc := suite.chainA.SenderAccount.GetAddress()
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, 1)
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1)
fee := types.Fee{
AckFee: defaultAckFee,
RecvFee: defaultReceiveFee,
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func (k Keeper) PayPacketFee(goCtx context.Context, msg *types.MsgPayPacketFee)
}

packetID := channeltypes.NewPacketId(
msg.SourceChannelId,
msg.SourcePortId,
msg.SourceChannelId,
sequence,
)

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() {
seq, _ := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceSend(ctxA, suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)

// build fee
packetID := channeltypes.NewPacketId(channelID, suite.path.EndpointA.ChannelConfig.PortID, seq)
packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, channelID, seq)
packetFee := types.NewPacketFee(fee, refundAcc.String(), nil)

tc.malleate()
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.C
return k.ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, acknowledgement)
}

packetID := channeltypes.NewPacketId(packet.GetDestChannel(), packet.GetDestPort(), packet.GetSequence())
packetID := channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence())

// retrieve the forward relayer that was stored in `onRecvPacket`
relayer, found := k.GetRelayerAddressForAsyncAck(ctx, packetID)
Expand Down
Loading