Skip to content

Commit

Permalink
Debug gov with inactive vals test
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Jul 19, 2024
1 parent 42f86bb commit f0e651a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions tests/e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func InactiveProviderValsTestConfig() TestConfig {
tr.chainConfigs[ChainID("provi")] = proviConfig
tr.chainConfigs[ChainID("consu")] = consuConfig

// make is to that carol does not use a consumer key
// make it so that carol does not use a consumer key
carolConfig := tr.validatorConfigs[ValidatorID("carol")]
carolConfig.UseConsumerKey = false
tr.validatorConfigs[ValidatorID("carol")] = carolConfig
Expand All @@ -606,7 +606,7 @@ func SmallMaxValidatorsTestConfig() TestConfig {
func GovTestConfig() TestConfig {
cfg := DefaultTestConfig()

// set the MaxValidators to 2
// set the quorum to 50%
proviConfig := cfg.chainConfigs[ChainID("provi")]
proviConfig.GenesisChanges += "| .app_state.gov.params.quorum = \"0.5\""
cfg.chainConfigs[ChainID("provi")] = proviConfig
Expand All @@ -620,18 +620,13 @@ func GovTestConfig() TestConfig {
}

func InactiveValsGovTestConfig() TestConfig {
cfg := InactiveProviderValsTestConfig()
cfg := GovTestConfig()

// set the MaxValidators to 2
// set the MaxValidators to 1
proviConfig := cfg.chainConfigs[ChainID("provi")]
proviConfig.GenesisChanges += "| .app_state.gov.params.quorum = \"0.5\""
proviConfig.GenesisChanges += "| .app_state.staking.params.max_validators = 1"
cfg.chainConfigs[ChainID("provi")] = proviConfig

carolConfig := cfg.validatorConfigs["carol"]
// make carol use her own key
carolConfig.UseConsumerKey = false
cfg.validatorConfigs["carol"] = carolConfig

return cfg
}

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/steps_inactive_vals.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func stepsInactiveProviderValidatorsGovernanceComparison() []Step {
InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1},
// the proposal should *not* have passed because only carol voted for it,
// and carol is not enough to pass the quorum
Status: strconv.Itoa(int(gov.ProposalStatus_PROPOSAL_STATUS_FAILED)),
Status: strconv.Itoa(int(gov.ProposalStatus_PROPOSAL_STATUS_REJECTED)),
},
},
},
Expand Down

0 comments on commit f0e651a

Please sign in to comment.