diff --git a/cmd/consumer.go b/cmd/consumer.go index c10702c7..5670f618 100644 --- a/cmd/consumer.go +++ b/cmd/consumer.go @@ -9,7 +9,6 @@ import ( pvm "github.com/cometbft/cometbft/privval" tmtypes "github.com/cometbft/cometbft/types" ccvconsumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types" - ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" "github.com/eve-network/eve/testutil" "github.com/spf13/cobra" @@ -152,9 +151,9 @@ type GenesisData struct { GenesisFile string GenDoc *genutiltypes.AppGenesis AppState map[string]json.RawMessage - ConsumerModuleState *ccvtypes.ConsumerGenesisState + ConsumerModuleState *ccvconsumertypes.GenesisState } -func NewGenesisData(genesisFile string, genDoc *genutiltypes.AppGenesis, appState map[string]json.RawMessage, consumerModuleState *ccvtypes.ConsumerGenesisState) *GenesisData { +func NewGenesisData(genesisFile string, genDoc *genutiltypes.AppGenesis, appState map[string]json.RawMessage, consumerModuleState *ccvconsumertypes.GenesisState) *GenesisData { return &GenesisData{GenesisFile: genesisFile, GenDoc: genDoc, AppState: appState, ConsumerModuleState: consumerModuleState} } diff --git a/testutil/consumer.go b/testutil/consumer.go index e5fa1a2a..b264a62b 100644 --- a/testutil/consumer.go +++ b/testutil/consumer.go @@ -3,21 +3,22 @@ package testutil import ( "time" - ibctypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck - "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck + ibccommitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + ccvconsumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types" ccvprovidertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" - ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" + "github.com/cosmos/interchain-security/v5/x/ccv/types" ) -func CreateMinimalConsumerTestGenesis() *ccvtypes.ConsumerGenesisState { - genesisState := ccvtypes.DefaultConsumerGenesisState() +func CreateMinimalConsumerTestGenesis() *ccvconsumertypes.GenesisState { + genesisState := ccvconsumertypes.DefaultGenesisState() genesisState.Params.Enabled = true genesisState.NewChain = true genesisState.Provider.ClientState = ccvprovidertypes.DefaultParams().TemplateClient genesisState.Provider.ClientState.ChainId = "eve" - genesisState.Provider.ClientState.LatestHeight = ibctypes.Height{RevisionNumber: 0, RevisionHeight: 1} - trustPeriod, err := ccvtypes.CalculateTrustPeriod(genesisState.Params.UnbondingPeriod, ccvprovidertypes.DefaultTrustingPeriodFraction) + genesisState.Provider.ClientState.LatestHeight = ibcclienttypes.Height{RevisionNumber: 0, RevisionHeight: 1} + trustPeriod, err := types.CalculateTrustPeriod(genesisState.Params.UnbondingPeriod, ccvprovidertypes.DefaultTrustingPeriodFraction) if err != nil { panic("provider client trusting period error") } @@ -26,7 +27,7 @@ func CreateMinimalConsumerTestGenesis() *ccvtypes.ConsumerGenesisState { genesisState.Provider.ClientState.MaxClockDrift = ccvprovidertypes.DefaultMaxClockDrift genesisState.Provider.ConsensusState = &ibctmtypes.ConsensusState{ Timestamp: time.Now().UTC(), - Root: types.MerkleRoot{Hash: []byte("dummy")}, + Root: ibccommitmenttypes.MerkleRoot{Hash: []byte("dummy")}, } return genesisState