Skip to content

Commit

Permalink
provider: allow provider to run as blockchain
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Oct 11, 2023
1 parent 31c648e commit a12d3dc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
tendermint "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
ibctesting "github.com/cosmos/ibc-go/v8/testing"
ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"
"github.com/spf13/cast"
Expand Down Expand Up @@ -106,9 +105,9 @@ import (

appparams "github.com/cosmos/interchain-security/v3/app/params"
testutil "github.com/cosmos/interchain-security/v3/testutil/integration"
ibcprovider "github.com/cosmos/interchain-security/v3/x/ccv/provider"
ibcproviderclient "github.com/cosmos/interchain-security/v3/x/ccv/provider/client"
ibcproviderkeeper "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper"
icsprovider "github.com/cosmos/interchain-security/v3/x/ccv/provider"
icsproviderclient "github.com/cosmos/interchain-security/v3/x/ccv/provider/client"
icsproviderkeeper "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper"
providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"
)

Expand Down Expand Up @@ -140,10 +139,10 @@ var (
paramsclient.ProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
ibcproviderclient.ConsumerAdditionProposalHandler,
ibcproviderclient.ConsumerRemovalProposalHandler,
ibcproviderclient.EquivocationProposalHandler,
ibcproviderclient.ChangeRewardDenomsProposalHandler,
icsproviderclient.ConsumerAdditionProposalHandler,
icsproviderclient.ConsumerRemovalProposalHandler,
icsproviderclient.EquivocationProposalHandler,
icsproviderclient.ChangeRewardDenomsProposalHandler,
},
),
params.AppModuleBasic{},
Expand All @@ -154,9 +153,9 @@ var (
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
tendermint.AppModuleBasic{},
// tendermint.AppModuleBasic{},
// router.AppModuleBasic{},
ibcprovider.AppModuleBasic{},
icsprovider.AppModuleBasic{},
)

// module account permissions
Expand Down Expand Up @@ -214,7 +213,7 @@ type App struct { // nolint: golint
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
ProviderKeeper ibcproviderkeeper.Keeper
ProviderKeeper icsproviderkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper

// make scoped keepers public for test purposes
Expand Down Expand Up @@ -275,6 +274,7 @@ func New(
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey,
providertypes.StoreKey,
consensusparamtypes.StoreKey,
)
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)

Expand Down Expand Up @@ -439,7 +439,7 @@ func New(
runtime.ProvideCometInfoService(),
)

app.ProviderKeeper = ibcproviderkeeper.NewKeeper(
app.ProviderKeeper = icsproviderkeeper.NewKeeper(
appCodec,
keys[providertypes.StoreKey],
app.GetSubspace(providertypes.ModuleName),
Expand All @@ -460,7 +460,7 @@ func New(
authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr),
)

providerModule := ibcprovider.NewAppModule(&app.ProviderKeeper, app.GetSubspace(providertypes.ModuleName))
providerModule := icsprovider.NewAppModule(&app.ProviderKeeper, app.GetSubspace(providertypes.ModuleName))

// register the proposal types
govRouter := govv1beta1.NewRouter()
Expand All @@ -470,7 +470,7 @@ func New(
// NOTE: @MSalopek -> remove NewSoftwareUpgradeProposalHandler
// AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)).
AddRoute(ibcexported.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(providertypes.RouterKey, ibcprovider.NewProviderProposalHandler(app.ProviderKeeper)).
AddRoute(providertypes.RouterKey, icsprovider.NewProviderProposalHandler(app.ProviderKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
govConfig := govtypes.DefaultConfig()

Expand Down Expand Up @@ -846,7 +846,7 @@ func (app *App) SimulationManager() *module.SimulationManager {
// ProviderApp interface implementations for integration tests

// GetProviderKeeper implements the ProviderApp interface.
func (app *App) GetProviderKeeper() ibcproviderkeeper.Keeper {
func (app *App) GetProviderKeeper() icsproviderkeeper.Keeper {
return app.ProviderKeeper
}

Expand Down

0 comments on commit a12d3dc

Please sign in to comment.