Skip to content

Commit

Permalink
nit(07-tendermint): remove unused authority argument. (#6890)
Browse files Browse the repository at this point in the history
* nit(07-tendermint): remove unused authority argument.

* docs: tweak integration section for registering tm light client module.
  • Loading branch information
DimitrisJim authored Jul 19, 2024
1 parent b9681af commit 6330deb
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 15 deletions.
7 changes: 2 additions & 5 deletions docs/docs/01-ibc/02-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,10 @@ import (
// after sealing the IBC router

clientRouter := app.IBCKeeper.ClientKeeper.GetRouter()
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()

tmLightClientModule := ibctm.NewLightClientModule(
appCodec,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule)

app.ModuleManager = module.NewManager(
// ...
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func NewSimApp(
clientRouter := app.IBCKeeper.ClientKeeper.GetRouter()
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()

tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule)

smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider)
Expand Down
7 changes: 2 additions & 5 deletions modules/core/02-client/types/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import (

"github.com/stretchr/testify/require"

authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
"github.com/cosmos/ibc-go/v9/modules/core/exported"
ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint"
Expand Down Expand Up @@ -57,7 +54,7 @@ func (suite *TypesTestSuite) TestAddRoute() {
cdc := suite.chainA.App.AppCodec()

storeProvider := types.NewStoreProvider(suite.chainA.GetSimApp().GetKey(exported.StoreKey))
tmLightClientModule := ibctm.NewLightClientModule(cdc, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(cdc, storeProvider)
router = types.NewRouter()

tc.malleate()
Expand Down Expand Up @@ -114,7 +111,7 @@ func (suite *TypesTestSuite) TestHasGetRoute() {
cdc := suite.chainA.App.AppCodec()

storeProvider := types.NewStoreProvider(suite.chainA.GetSimApp().GetKey(exported.StoreKey))
tmLightClientModule := ibctm.NewLightClientModule(cdc, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(cdc, storeProvider)
router := types.NewRouter()
router.AddRoute(exported.Tendermint, &tmLightClientModule)

Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/07-tendermint/light_client_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type LightClientModule struct {
}

// NewLightClientModule creates and returns a new 07-tendermint LightClientModule.
func NewLightClientModule(cdc codec.BinaryCodec, storeProvider clienttypes.StoreProvider, authority string) LightClientModule {
func NewLightClientModule(cdc codec.BinaryCodec, storeProvider clienttypes.StoreProvider) LightClientModule {
return LightClientModule{
cdc: cdc,
storeProvider: storeProvider,
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ func NewSimApp(
clientRouter := app.IBCKeeper.ClientKeeper.GetRouter()
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()

tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule)

smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider)
Expand Down
2 changes: 1 addition & 1 deletion simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ func NewSimApp(
clientRouter := app.IBCKeeper.ClientKeeper.GetRouter()
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()

tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule)

smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider)
Expand Down
2 changes: 1 addition & 1 deletion testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func NewSimApp(
clientRouter := app.IBCKeeper.ClientKeeper.GetRouter()
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()

tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider, authtypes.NewModuleAddress(govtypes.ModuleName).String())
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule)

smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider)
Expand Down

0 comments on commit 6330deb

Please sign in to comment.