Skip to content

Commit

Permalink
rename: router -> packetforward (#118)
Browse files Browse the repository at this point in the history
* rename: `router` -> `packetforward`

* use RouterKey for the Module keys

(cherry picked from commit 47f2ae0)

# Conflicts:
#	middleware/packet-forward-middleware/Makefile
#	middleware/packet-forward-middleware/packetforward/client/cli/cli.go
#	middleware/packet-forward-middleware/packetforward/ibc_middleware.go
#	middleware/packet-forward-middleware/packetforward/keeper/genesis.go
#	middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go
#	middleware/packet-forward-middleware/packetforward/keeper/keeper.go
#	middleware/packet-forward-middleware/packetforward/keeper/params.go
#	middleware/packet-forward-middleware/packetforward/module.go
#	middleware/packet-forward-middleware/packetforward/module_test.go
#	middleware/packet-forward-middleware/packetforward/types/forward_test.go
#	middleware/packet-forward-middleware/packetforward/types/genesis.pb.go
#	middleware/packet-forward-middleware/packetforward/types/query.pb.go
#	middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go
#	middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto
#	middleware/packet-forward-middleware/proto/packetforward/v1/query.proto
#	middleware/packet-forward-middleware/scripts/protocgen.sh
#	middleware/packet-forward-middleware/test/mock/bank_keeper.go
#	middleware/packet-forward-middleware/test/mock/channel_keeper.go
#	middleware/packet-forward-middleware/test/mock/distribution_keeper.go
#	middleware/packet-forward-middleware/test/mock/transfer_keeper.go
#	middleware/packet-forward-middleware/test/setup.go
  • Loading branch information
Reecepbcups authored and mergify[bot] committed Oct 11, 2023
1 parent 2bf709a commit 0cdfd27
Show file tree
Hide file tree
Showing 28 changed files with 261 additions and 74 deletions.
9 changes: 9 additions & 0 deletions middleware/packet-forward-middleware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,21 @@ cosmovisor:

mocks: $(MOCKS_DIR)
go install go.uber.org/mock/mockgen@v0.2.0
<<<<<<< HEAD
mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/router/types TransferKeeper
mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/router/types DistributionKeeper
mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/router/types BankKeeper
mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper
mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v6/modules/core/05-port/types ICS4Wrapper
mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v6/modules/core/05-port/types IBCModule
=======
mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/packetforward/types TransferKeeper
mockgen -package=mock -destination=./test/mock/distribution_keeper.go $(GOMOD)/packetforward/types DistributionKeeper
mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/packetforward/types BankKeeper
mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/packetforward/types ChannelKeeper
mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types ICS4Wrapper
mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types IBCModule
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118))

.PHONY: mocks

Expand Down
2 changes: 1 addition & 1 deletion middleware/packet-forward-middleware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The examples above show the intended usage of the `receiver` field for one or mu

## Implementation details

Flow sequence mainly encoded in [middleware](router/ibc_middleware.go) and in [keeper](router/keeper/keeper.go).
Flow sequence mainly encoded in [middleware](packetforward/ibc_middleware.go) and in [keeper](packetforward/keeper/keeper.go).

Describes `A` sending to `C` via `B` in several scenarios with operational opened channels, enabled denom composition, fees and available to refund, but no retries.

Expand Down
6 changes: 3 additions & 3 deletions middleware/packet-forward-middleware/docs/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Integration of the PFM should take approximately 20 minutes.

// Import the packet forward middleware
import (
packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router"
packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/keeper"
packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/router/types"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"
packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
)

...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ package cli
import (
"fmt"

<<<<<<< HEAD:middleware/packet-forward-middleware/router/client/cli/cli.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/client/cli/cli.go
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
)

// GetQueryCmd returns the query commands for router
// GetQueryCmd returns the query commands for packetforward
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: "ibc-router",
Use: "packetforward",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}
Expand All @@ -26,14 +30,14 @@ func GetQueryCmd() *cobra.Command {
return queryCmd
}

// GetCmdParams returns the command handler for ibc-router parameter querying.
// GetCmdParams returns the command handler for packetforward parameter querying.
func GetCmdParams() *cobra.Command {
cmd := &cobra.Command{
Use: "params",
Short: "Query the current ibc-router parameters",
Long: "Query the current ibc-router parameters",
Short: "Query the current packetforward parameters",
Long: "Query the current packetforward parameters",
Args: cobra.NoArgs,
Example: fmt.Sprintf("%s query ibc-router params", version.AppName),
Example: fmt.Sprintf("%s query packetforward params", version.AppName),
RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
Expand All @@ -54,7 +58,7 @@ func GetCmdParams() *cobra.Command {
return cmd
}

// NewTxCmd returns the transaction commands for router
// NewTxCmd returns the transaction commands for packetforward
func NewTxCmd() *cobra.Command {
return nil
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package router
package packetforward

import (
"encoding/json"
Expand All @@ -7,8 +7,13 @@ import (
"time"

"github.com/armon/go-metrics"
<<<<<<< HEAD:middleware/packet-forward-middleware/router/ibc_middleware.go

Check failure on line 10 in middleware/packet-forward-middleware/packetforward/ibc_middleware.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======

Check failure on line 13 in middleware/packet-forward-middleware/packetforward/ibc_middleware.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/ibc_middleware.go

Check failure on line 16 in middleware/packet-forward-middleware/packetforward/ibc_middleware.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)

errorsmod "cosmossdk.io/errors"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package keeper

import (
<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/genesis.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/genesis.go

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ package keeper
import (
"context"

<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/grpc_query.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import (
"time"

"github.com/armon/go-metrics"
<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/keeper.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
"github.com/tendermint/tendermint/libs/log"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/keeper.go

errorsmod "cosmossdk.io/errors"

Expand Down Expand Up @@ -39,7 +43,7 @@ var (
// DefaultForwardTransferPacketTimeoutTimestamp is the timeout timestamp following IBC defaults
DefaultForwardTransferPacketTimeoutTimestamp = time.Duration(transfertypes.DefaultRelativePacketTimeoutTimestamp) * time.Nanosecond

// DefaultRefundTransferPacketTimeoutTimestamp is a 28-day timeout for refund packets since funds are stuck in router module otherwise.
// DefaultRefundTransferPacketTimeoutTimestamp is a 28-day timeout for refund packets since funds are stuck in packetforward module otherwise.
DefaultRefundTransferPacketTimeoutTimestamp = 28 * 24 * time.Hour
)

Expand Down Expand Up @@ -378,14 +382,14 @@ func (k *Keeper) RetryTimeout(

amount, ok := sdk.NewIntFromString(data.Amount)
if !ok {
k.Logger(ctx).Error("packetForwardMiddleware error parsing amount from string for router retry on timeout",
k.Logger(ctx).Error("packetForwardMiddleware error parsing amount from string for packetforward retry on timeout",
"original-sender-address", inFlightPacket.OriginalSenderAddress,
"refund-channel-id", inFlightPacket.RefundChannelId,
"refund-port-id", inFlightPacket.RefundPortId,
"retries-remaining", inFlightPacket.RetriesRemaining,
"amount", data.Amount,
)
return fmt.Errorf("error parsing amount from string for router retry: %s", data.Amount)
return fmt.Errorf("error parsing amount from string for packetforward retry: %s", data.Amount)
}

denom := transfertypes.ParseDenomTrace(data.Denom).IBCDenom()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package keeper

import (
<<<<<<< HEAD:middleware/packet-forward-middleware/router/keeper/params.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/keeper/params.go

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
package router
package packetforward

import (
"context"
"encoding/json"
"fmt"
"math/rand"

<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go

Check failure on line 9 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/client/cli"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
=======

Check failure on line 13 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/client/cli"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go

Check failure on line 17 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

missing import path (typecheck)
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
Expand All @@ -28,7 +34,7 @@ var (
_ module.AppModuleSimulation = AppModule{}
)
// AppModuleBasic is the router AppModuleBasic
// AppModuleBasic is the packetforward AppModuleBasic
type AppModuleBasic struct{}
// Name implements AppModuleBasic interface
Expand All @@ -43,13 +49,18 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {}
// DefaultGenesis returns default genesis state as raw bytes for the ibc
// router module.
// packetforward module.
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
return cdc.MustMarshalJSON(types.DefaultGenesisState())
}
<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go

Check failure on line 57 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

expected declaration, found '<<' (typecheck)
// ValidateGenesis performs genesis state validation for the router module.
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error {
=======
// ValidateGenesis performs genesis state validation for the packetforward module.
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error {
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go

Check failure on line 63 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

illegal character U+0023 '#' (typecheck)
var gs types.GenesisState
if err := cdc.UnmarshalJSON(bz, &gs); err != nil {

Check failure on line 65 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

expected declaration, found 'if' (typecheck)
return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err)
Expand All @@ -61,7 +72,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
// RegisterRESTRoutes implements AppModuleBasic interface
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {}
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-router module.
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the packetforward module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
_ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
}
Expand All @@ -82,7 +93,7 @@ type AppModule struct {
keeper *keeper.Keeper
}
// NewAppModule creates a new router module
// NewAppModule creates a new packetforward module
func NewAppModule(k *keeper.Keeper) AppModule {
return AppModule{
keeper: k,
Expand Down Expand Up @@ -112,7 +123,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
}
// InitGenesis performs genesis initialization for the ibc-router module. It returns
// InitGenesis performs genesis initialization for the packetforward module. It returns
// no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate {
err := am.ValidateGenesis(cdc, nil, data)
Expand All @@ -126,7 +137,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.
return []abci.ValidatorUpdate{}
}
// ExportGenesis returns the exported genesis state as raw bytes for the ibc-router
// ExportGenesis returns the exported genesis state as raw bytes for the packetforward
// module.
func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage {
gs := am.keeper.ExportGenesis(ctx)
Expand All @@ -146,8 +157,13 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V
// AppModuleSimulation functions
<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go

Check failure on line 160 in middleware/packet-forward-middleware/packetforward/module.go

View workflow job for this annotation

GitHub Actions / Linter (./middleware/packet-forward-middleware)

expected declaration, found '<<' (typecheck)
// GenerateGenesisState creates a randomized GenState of the router module.
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {}
=======
// GenerateGenesisState creates a randomized GenState of the packetforward module.
func (AppModule) GenerateGenesisState(_ *module.SimulationState) {}
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go
// ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
Expand All @@ -159,10 +175,15 @@ func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange {
return nil
}
<<<<<<< HEAD:middleware/packet-forward-middleware/router/module.go
// RegisterStoreDecoder registers a decoder for router module's types
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {}
=======
// RegisterStoreDecoder registers a decoder for packetforward module's types
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {}
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module.go

// WeightedOperations returns the all the router module operations with their respective weights.
// WeightedOperations returns the all the packetforward module operations with their respective weights.
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
return nil
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
package router_test
package packetforward_test

import (
"encoding/json"
"fmt"
"testing"

<<<<<<< HEAD:middleware/packet-forward-middleware/router/module_test.go
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/router/types"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/test"
=======
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/test"
>>>>>>> 47f2ae0 (rename: `router` -> `packetforward` (#118)):middleware/packet-forward-middleware/packetforward/module_test.go
"github.com/iancoleman/orderedmap"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
Expand Down Expand Up @@ -291,7 +297,7 @@ func TestOnRecvPacket_ForwardNoFee(t *testing.T) {
Return(nil),
)

// chain B with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr)
require.Nil(t, ack)

Expand Down Expand Up @@ -352,7 +358,7 @@ func TestOnRecvPacket_ForwardAmountInt256(t *testing.T) {
Return(nil),
)

// chain B with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr)
require.Nil(t, ack)

Expand All @@ -371,7 +377,7 @@ func TestOnRecvPacket_ForwardWithFee(t *testing.T) {
forwardMiddleware := setup.ForwardMiddleware

// Set fee param to 10%
setup.Keepers.RouterKeeper.SetParams(ctx, types.NewParams(sdk.NewDecWithPrec(10, 2)))
setup.Keepers.PacketForwardKeeper.SetParams(ctx, types.NewParams(sdk.NewDecWithPrec(10, 2)))

denom := makeIBCDenom(testDestinationPort, testDestinationChannel, testDenom)
senderAccAddr := test.AccAddress(t)
Expand Down Expand Up @@ -418,7 +424,7 @@ func TestOnRecvPacket_ForwardWithFee(t *testing.T) {
Return(nil),
)

// chain B with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr)
require.Nil(t, ack)

Expand Down Expand Up @@ -519,11 +525,11 @@ func TestOnRecvPacket_ForwardMultihopStringNext(t *testing.T) {
Return(nil),
)

// chain B with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr)
require.Nil(t, ack)

// chain C with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain C with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack = forwardMiddleware.OnRecvPacket(ctx, packet2, senderAccAddr2)
require.Nil(t, ack)

Expand Down Expand Up @@ -631,11 +637,11 @@ func TestOnRecvPacket_ForwardMultihopJSONNext(t *testing.T) {
Return(nil),
)

// chain B with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain B with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack := forwardMiddleware.OnRecvPacket(ctx, packetOrig, senderAccAddr)
require.Nil(t, ack)

// chain C with router module receives packet and forwards. ack should be nil so that it is not written yet.
// chain C with packetforward module receives packet and forwards. ack should be nil so that it is not written yet.
ack = forwardMiddleware.OnRecvPacket(ctx, packet2, senderAccAddr2)
require.Nil(t, ack)

Expand Down
Loading

0 comments on commit 0cdfd27

Please sign in to comment.