From 50532e16b8fa2cb3279a1644f880ad50f19727e2 Mon Sep 17 00:00:00 2001 From: MSalopek Date: Thu, 16 May 2024 17:44:59 +0200 Subject: [PATCH] tests: reduce voting period in testnets exports (#3099) --- cmd/gaiad/cmd/testnet_set_local_validator.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/gaiad/cmd/testnet_set_local_validator.go b/cmd/gaiad/cmd/testnet_set_local_validator.go index 1eb27e6ad84..e6a0001aace 100644 --- a/cmd/gaiad/cmd/testnet_set_local_validator.go +++ b/cmd/gaiad/cmd/testnet_set_local_validator.go @@ -10,6 +10,7 @@ import ( "io" "path/filepath" "strings" + "time" dbm "github.com/cometbft/cometbft-db" "github.com/cosmos/cosmos-sdk/codec/types" @@ -247,6 +248,12 @@ func updateApplicationState(app *gaia.GaiaApp, args valArgs) error { app.SlashingKeeper.SetValidatorSigningInfo(appCtx, newConsAddr, newValidatorSigningInfo) + shortVotingPeriod := time.Second * 20 + params := app.GovKeeper.GetParams(appCtx) + params.VotingPeriod = &shortVotingPeriod + app.GovKeeper.SetParams(appCtx, params) + appCtx.Logger().Info("Updated governance voting period", "voting_period", shortVotingPeriod) + // BANK defaultCoins := sdk.NewCoins(sdk.NewInt64Coin(app.StakingKeeper.BondDenom(appCtx), 1000000000000))