Skip to content

Commit

Permalink
fix forgotten renames
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Feb 15, 2024
1 parent f6871b2 commit c980a5c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
8 changes: 4 additions & 4 deletions x/gov/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion x/gov/keeper/proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestGetVotingPeriod() {
},
{
name: "param changes proposal",
content: govgenhelpers.TestParamsChangeProposal,
content: govgenhelpers.TestParameterChangeProposal,
expectedVotingPeriod: types.DefaultPeriodParameterChange,
},
{
Expand Down
30 changes: 15 additions & 15 deletions x/gov/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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),
)

Expand Down

0 comments on commit c980a5c

Please sign in to comment.