Skip to content

Commit

Permalink
tests: reduce voting period in testnets exports (backport #3099) (#3101)
Browse files Browse the repository at this point in the history
* tests: reduce voting period in testnets exports (#3099)

(cherry picked from commit 50532e1)

* fix: handle broken import with build tag

---------

Co-authored-by: MSalopek <[email protected]>
  • Loading branch information
mergify[bot] and MSalopek authored May 16, 2024
1 parent a87a075 commit 4550586
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/gaiad/cmd/testnet_set_local_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import (
"io"
"path/filepath"
"strings"
"time"

dbm "github.com/cometbft/cometbft-db"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
gaia "github.com/cosmos/gaia/v16/app"
gaia "github.com/cosmos/gaia/v17/app"
"github.com/spf13/cast"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit 4550586

Please sign in to comment.