Skip to content

Commit

Permalink
fix: used parameter of voting period to update gov genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jul 25, 2024
1 parent c5d6f45 commit 5019776
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/e2e/initialization/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func initGenesis(chain *internalChain, votingPeriod, expeditedVotingPeriod time.
return err
}

err = updateModuleGenesis(appGenState, govtypes.ModuleName, &govv1.GenesisState{}, updateGovGenesis)
err = updateModuleGenesis(appGenState, govtypes.ModuleName, &govv1.GenesisState{}, updateGovGenesis(votingPeriod, expeditedVotingPeriod))
if err != nil {
return err
}
Expand Down Expand Up @@ -295,11 +295,12 @@ func updateBankGenesis(bankGenState *banktypes.GenesisState) {
})
}

func updateGovGenesis(govGenState *govv1.GenesisState) {
govGenState.Params.MinDeposit = sdk.NewCoins(sdk.NewCoin(BabylonDenom, sdkmath.NewInt(100)))

votingPeriod := time.Duration(time.Second * 10)
govGenState.Params.VotingPeriod = &votingPeriod
func updateGovGenesis(votingPeriod, expeditedVotingPeriod time.Duration) func(govGenState *govv1.GenesisState) {
return func(govGenState *govv1.GenesisState) {
govGenState.Params.MinDeposit = sdk.NewCoins(sdk.NewCoin(BabylonDenom, sdkmath.NewInt(100)))
govGenState.Params.VotingPeriod = &votingPeriod
govGenState.Params.ExpeditedVotingPeriod = &expeditedVotingPeriod
}
}

func updateMintGenesis(mintGenState *minttypes.GenesisState) {
Expand Down

0 comments on commit 5019776

Please sign in to comment.