Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(gov)!: use collections for constitution and params state #16118

Merged
merged 10 commits into from
May 12, 2023
Prev Previous commit
Next Next commit
more test fixes
unknown unknown committed May 12, 2023
commit c503920000e014f07328e33948b8681a388122db
6 changes: 4 additions & 2 deletions tests/integration/gov/genesis_test.go
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ package gov_test

import (
"encoding/json"
"github.com/stretchr/testify/require"
"testing"

abci "github.com/cometbft/cometbft/abci/types"
@@ -88,7 +89,8 @@ func TestImportExportQueues(t *testing.T) {
assert.NilError(t, err)
proposalID2 := proposal2.Id

params, _ := s1.GovKeeper.GetParams(ctx)
params, err := s1.GovKeeper.Params.Get(ctx)
require.NoError(t, err)
votingStarted, err := s1.GovKeeper.AddDeposit(ctx, proposalID2, addrs[0], params.MinDeposit)
assert.NilError(t, err)
assert.Assert(t, votingStarted)
@@ -145,7 +147,7 @@ func TestImportExportQueues(t *testing.T) {

ctx2 := s2.app.BaseApp.NewContext(false, cmtproto.Header{})

params, err = s2.GovKeeper.GetParams(ctx2)
params, err = s2.GovKeeper.Params.Get(ctx2)
assert.NilError(t, err)
// Jump the time forward past the DepositPeriod and VotingPeriod
ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod))