Skip to content

Commit

Permalink
Set ProviderConsensusValSet in proposal test
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed May 24, 2024
1 parent 70a6bf1 commit 1265836
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion x/ccv/provider/keeper/proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package keeper_test
import (
"bytes"
"encoding/json"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"sort"
"testing"
"time"

stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
_go "github.com/cosmos/ics23/go"
Expand All @@ -21,6 +22,7 @@ import (
cryptotestutil "github.com/cosmos/interchain-security/v4/testutil/crypto"
testkeeper "github.com/cosmos/interchain-security/v4/testutil/keeper"
providerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/provider/keeper"
"github.com/cosmos/interchain-security/v4/x/ccv/provider/types"
providertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types"
ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types"
)
Expand Down Expand Up @@ -1050,6 +1052,14 @@ func TestBeginBlockInit(t *testing.T) {
mocks.MockStakingKeeper.EXPECT().GetLastValidatorPower(gomock.Any(), validator.GetOperator()).Return(int64(1)).AnyTimes()
providerKeeper.SetOptedIn(ctx, pendingProps[4].ChainId, providertypes.NewProviderConsAddress(consAddr))

providerKeeper.SetLastProviderConsensusValSet(ctx, []types.ConsumerValidator{
{
ProviderConsAddr: consAddr,
Power: 1,
},
},
)

providerKeeper.BeginBlockInit(ctx)

// first proposal is not pending anymore because its spawn time already passed and was executed
Expand Down

0 comments on commit 1265836

Please sign in to comment.