From c980a5c5099770b76e7a6c6fc040399f82240510 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Thu, 15 Feb 2024 16:48:50 +0100 Subject: [PATCH] fix forgotten renames --- app/helpers/test_helpers.go | 6 +++--- x/gov/abci_test.go | 8 ++++---- x/gov/keeper/proposal_test.go | 2 +- x/gov/simulation/genesis.go | 30 +++++++++++++++--------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 00b94f9..4e6bb36 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -45,9 +45,9 @@ const ( ) var ( - TestTextProposal = types.NewTextProposal("Test", "description") - TestParamsChangeProposal = paramsproposal.NewParameterChangeProposal( - "Test", "description", []paramsproposal.ParamChange{}, // TODO test such proposal? + TestTextProposal = types.NewTextProposal("Test", "description") + TestParameterChangeProposal = paramsproposal.NewParameterChangeProposal( + "Test", "description", []paramsproposal.ParamChange{}, ) TestSoftwareUpgradeProposal = upgradetypes.NewSoftwareUpgradeProposal( "Test", "description", upgradetypes.Plan{ diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index c3d7c23..1e11fed 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -215,17 +215,17 @@ func TestTickPassedVotingPeriod(t *testing.T) { votingPeriod: types.DefaultPeriodText, }, { - name: "params change proposal", - content: govgenhelpers.TestParamsChangeProposal, + name: "parameter change proposal", + content: govgenhelpers.TestParameterChangeProposal, votingPeriod: types.DefaultPeriodParameterChange, }, { - name: "upgrade proposal", + name: "software upgrade proposal", content: govgenhelpers.TestSoftwareUpgradeProposal, votingPeriod: types.DefaultPeriodSoftwareUpgrade, }, { - name: "cancel upgrade proposal", + name: "cancel software upgrade proposal", content: govgenhelpers.TestCancelSoftwareUpgradeProposal, votingPeriod: types.DefaultPeriodSoftwareUpgrade, }, diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 723cd95..24f5f41 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestGetVotingPeriod() { }, { name: "param changes proposal", - content: govgenhelpers.TestParamsChangeProposal, + content: govgenhelpers.TestParameterChangeProposal, expectedVotingPeriod: types.DefaultPeriodParameterChange, }, { diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 7049575..7b3849b 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -17,14 +17,14 @@ import ( // Simulation parameter constants const ( - DepositParamsMinDeposit = "deposit_params_min_deposit" - DepositParamsDepositPeriod = "deposit_params_deposit_period" - VotingParamsVotingPeriodParamsChange = "voting_params_voting_period_params_change" - VotingParamsVotingPeriodUpgrade = "voting_params_voting_period_upgrade" - VotingParamsVotingPeriodText = "voting_params_voting_period_text" - TallyParamsQuorum = "tally_params_quorum" - TallyParamsThreshold = "tally_params_threshold" - TallyParamsVeto = "tally_params_veto" + DepositParamsMinDeposit = "deposit_params_min_deposit" + DepositParamsDepositPeriod = "deposit_params_deposit_period" + VotingParamsVotingPeriodParameterChange = "voting_params_voting_period_parameter_change" + VotingParamsVotingPeriodSoftwareUpgrade = "voting_params_voting_period_software_upgrade" + VotingParamsVotingPeriodText = "voting_params_voting_period_text" + TallyParamsQuorum = "tally_params_quorum" + TallyParamsThreshold = "tally_params_threshold" + TallyParamsVeto = "tally_params_veto" ) // GenDepositParamsDepositPeriod randomized DepositParamsDepositPeriod @@ -73,15 +73,15 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { depositPeriod = GenDepositParamsDepositPeriod(r) }, ) - var votingPeriodParamsChange time.Duration + var votingPeriodParameterChange time.Duration simState.AppParams.GetOrGenerate( - simState.Cdc, VotingParamsVotingPeriodParamsChange, &votingPeriodParamsChange, simState.Rand, - func(r *rand.Rand) { votingPeriodParamsChange = GenVotingParamsVotingPeriod(r) }, + simState.Cdc, VotingParamsVotingPeriodParameterChange, &votingPeriodParameterChange, simState.Rand, + func(r *rand.Rand) { votingPeriodParameterChange = GenVotingParamsVotingPeriod(r) }, ) - var votingPeriodUpgrade time.Duration + var votingPeriodSoftwareUpgrade time.Duration simState.AppParams.GetOrGenerate( - simState.Cdc, VotingParamsVotingPeriodUpgrade, &votingPeriodUpgrade, simState.Rand, - func(r *rand.Rand) { votingPeriodUpgrade = GenVotingParamsVotingPeriod(r) }, + simState.Cdc, VotingParamsVotingPeriodSoftwareUpgrade, &votingPeriodSoftwareUpgrade, simState.Rand, + func(r *rand.Rand) { votingPeriodSoftwareUpgrade = GenVotingParamsVotingPeriod(r) }, ) var votingPeriodText time.Duration simState.AppParams.GetOrGenerate( @@ -110,7 +110,7 @@ func RandomizedGenState(simState *module.SimulationState) { govGenesis := types.NewGenesisState( startingProposalID, types.NewDepositParams(minDeposit, depositPeriod), - types.NewVotingParams(votingPeriodParamsChange, votingPeriodUpgrade, votingPeriodText), + types.NewVotingParams(votingPeriodParameterChange, votingPeriodSoftwareUpgrade, votingPeriodText), types.NewTallyParams(quorum, threshold, veto), )