Skip to content

Commit

Permalink
FIN
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Aug 15, 2023
1 parent 4a5a561 commit 61ea661
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

// add mint
mint "github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
Expand Down Expand Up @@ -112,6 +113,7 @@ import (
ccvdistr "github.com/cosmos/interchain-security/v3/x/ccv/democracy/distribution"
ccvgov "github.com/cosmos/interchain-security/v3/x/ccv/democracy/governance"
ccvstaking "github.com/cosmos/interchain-security/v3/x/ccv/democracy/staking"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

const (
Expand Down Expand Up @@ -712,7 +714,7 @@ func New(
return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err)
}

consumerGenesis := consumertypes.GenesisState{}
consumerGenesis := ccvtypes.GenesisState{}
appCodec.MustUnmarshalJSON(appState[consumertypes.ModuleName], &consumerGenesis)

consumerGenesis.PreCCV = true
Expand Down
3 changes: 2 additions & 1 deletion legacy_ibc_testing/testing/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/cosmos/ibc-go/v7/modules/core/keeper"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"

"github.com/cosmos/interchain-security/v3/legacy_ibc_testing/simapp"
consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
Expand Down Expand Up @@ -110,7 +111,7 @@ func SetupWithGenesisValSet(t *testing.T, appIniter AppIniter, valSet *tmtypes.V
// set validators and delegations
var (
stakingGenesis stakingtypes.GenesisState
consumerGenesis consumertypes.GenesisState
consumerGenesis ccvtypes.GenesisState
bondDenom string
)
if genesisState[stakingtypes.ModuleName] != nil {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"

consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
"github.com/cosmos/interchain-security/v3/x/ccv/provider/client"
"github.com/cosmos/interchain-security/v3/x/ccv/provider/types"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

type SendTokensAction struct {
Expand Down Expand Up @@ -235,7 +235,7 @@ func (tr TestRun) submitConsumerAdditionProposal(
verbose bool,
) {
spawnTime := tr.containerConfig.now.Add(time.Duration(action.spawnTime) * time.Millisecond)
params := consumertypes.DefaultParams()
params := ccvtypes.DefaultParams()
prop := client.ConsumerAdditionProposalJSON{
Title: "Propose the addition of a new chain",
Summary: "Gonna be a great chain",
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (s *CCVTestSuite) TestRewardsDistribution() {

// reward for the provider chain will be sent after each 2 blocks
consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName)
consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(2))
consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(2))
s.consumerChain.NextBlock()

consumerAccountKeeper := s.consumerApp.GetTestAccountKeeper()
Expand Down Expand Up @@ -166,7 +166,7 @@ func (s *CCVTestSuite) TestSendRewardsRetries() {

// reward for the provider chain will be sent after each 1000 blocks
consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName)
consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(1000))
consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(1000))

// fill fee pool
fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)))
Expand Down Expand Up @@ -296,7 +296,7 @@ func (s *CCVTestSuite) TestEndBlockRD() {

// reward for the provider chain will be sent after each 1000 blocks
consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName)
consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(1000))
consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(1000))

// fill fee pool
fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)))
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/normal_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

// Tests the tracking of historical info in the context of new blocks being committed
Expand Down Expand Up @@ -73,7 +74,7 @@ func (k CCVTestSuite) TestHistoricalInfo() { //nolint:govet // this is a test so
expLen: 0,
},
{
height: initHeight + consumertypes.DefaultHistoricalEntries + 2,
height: initHeight + ccvtypes.DefaultHistoricalEntries + 2,
found: true,
expLen: initValsetLen + 2,
},
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
ibctesting "github.com/cosmos/interchain-security/v3/legacy_ibc_testing/testing"
icstestingutils "github.com/cosmos/interchain-security/v3/testutil/ibc_testing"
testutil "github.com/cosmos/interchain-security/v3/testutil/integration"
consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
ccv "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

Expand Down Expand Up @@ -152,7 +151,7 @@ func (suite *CCVTestSuite) SetupTest() {
func initConsumerChain(
s *CCVTestSuite,
chainID string,
genesisState *consumertypes.GenesisState,
genesisState *ccv.GenesisState,
) {
providerKeeper := s.providerApp.GetProviderKeeper()
bundle := s.consumerBundles[chainID]
Expand Down

0 comments on commit 61ea661

Please sign in to comment.