diff --git a/app/testnet.go b/app/testnet.go index 0a4238b77..a27568ab4 100644 --- a/app/testnet.go +++ b/app/testnet.go @@ -42,9 +42,11 @@ type TestnetValidator struct { Delegations []TestnetDelegation } -type TestnetGov struct { - VotePeriod time.Duration `json:"vote_period"` - ExpeditedVotePeriod time.Duration `json:"expedited_vote_period"` +type TestnetGovConfig struct { + VotingParams *struct { + VotingPeriod time.Duration `json:"voting_period,omitempty"` + ExpeditedVotePeriod time.Duration `json:"expedited_vote_period"` + } `json:"voting_params,omitempty"` } type TestnetUpgrade struct { @@ -59,7 +61,7 @@ type TestnetAccount struct { type TestnetConfig struct { Accounts []TestnetAccount Validators []TestnetValidator - Gov TestnetGov + Gov TestnetGovConfig Upgrade TestnetUpgrade } @@ -256,8 +258,8 @@ func InitAkashAppForTestnet( if err != nil { panic(err.Error()) } - govParams.ExpeditedVotingPeriod = &tcfg.Gov.ExpeditedVotePeriod - govParams.VotingPeriod = &tcfg.Gov.VotePeriod + govParams.ExpeditedVotingPeriod = &tcfg.Gov.VotingParams.ExpeditedVotePeriod + govParams.VotingPeriod = &tcfg.Gov.VotingParams.VotingPeriod govParams.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin(sdkutil.DenomUakt, 100000000)) govParams.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewInt64Coin(sdkutil.DenomUakt, 150000000)) diff --git a/cmd/akash/cmd/testnetify/config.go b/cmd/akash/cmd/testnetify/config.go index f306a9923..251bda818 100644 --- a/cmd/akash/cmd/testnetify/config.go +++ b/cmd/akash/cmd/testnetify/config.go @@ -62,7 +62,7 @@ type TestnetConfig struct { ChainID string `json:"chain_id"` Validators TestnetValidators `json:"validators"` Accounts []akash.TestnetAccount `json:"accounts"` - Gov akash.TestnetGov `json:"gov"` + Gov akash.TestnetGovConfig `json:"gov"` upgrade akash.TestnetUpgrade } diff --git a/tests/upgrade/testnet.json b/tests/upgrade/testnet.json index 65e2d9e4d..5b6fa1a05 100644 --- a/tests/upgrade/testnet.json +++ b/tests/upgrade/testnet.json @@ -2,7 +2,8 @@ "chain_id": "localakash", "gov": { "voting_params": { - "voting_period": "60s" + "voting_period": "60s", + "expedited_vote_period": "60s" } }, "accounts": [