Skip to content

Commit f5d4de7

Browse files
authored
fix(testnet): port gov config from v0.38.x (#2020)
Signed-off-by: Artur Troian <[email protected]> Co-authored-by: Artur Troian <[email protected]>
1 parent fe4afca commit f5d4de7

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

app/testnet.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ type TestnetValidator struct {
4242
Delegations []TestnetDelegation
4343
}
4444

45-
type TestnetGov struct {
46-
VotePeriod time.Duration `json:"vote_period"`
47-
ExpeditedVotePeriod time.Duration `json:"expedited_vote_period"`
45+
type TestnetGovConfig struct {
46+
VotingParams *struct {
47+
VotingPeriod time.Duration `json:"voting_period,omitempty"`
48+
ExpeditedVotePeriod time.Duration `json:"expedited_vote_period"`
49+
} `json:"voting_params,omitempty"`
4850
}
4951

5052
type TestnetUpgrade struct {
@@ -59,7 +61,7 @@ type TestnetAccount struct {
5961
type TestnetConfig struct {
6062
Accounts []TestnetAccount
6163
Validators []TestnetValidator
62-
Gov TestnetGov
64+
Gov TestnetGovConfig
6365
Upgrade TestnetUpgrade
6466
}
6567

@@ -256,8 +258,8 @@ func InitAkashAppForTestnet(
256258
if err != nil {
257259
panic(err.Error())
258260
}
259-
govParams.ExpeditedVotingPeriod = &tcfg.Gov.ExpeditedVotePeriod
260-
govParams.VotingPeriod = &tcfg.Gov.VotePeriod
261+
govParams.ExpeditedVotingPeriod = &tcfg.Gov.VotingParams.ExpeditedVotePeriod
262+
govParams.VotingPeriod = &tcfg.Gov.VotingParams.VotingPeriod
261263
govParams.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin(sdkutil.DenomUakt, 100000000))
262264
govParams.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewInt64Coin(sdkutil.DenomUakt, 150000000))
263265

cmd/akash/cmd/testnetify/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type TestnetConfig struct {
6262
ChainID string `json:"chain_id"`
6363
Validators TestnetValidators `json:"validators"`
6464
Accounts []akash.TestnetAccount `json:"accounts"`
65-
Gov akash.TestnetGov `json:"gov"`
65+
Gov akash.TestnetGovConfig `json:"gov"`
6666
upgrade akash.TestnetUpgrade
6767
}
6868

tests/upgrade/testnet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"chain_id": "localakash",
33
"gov": {
44
"voting_params": {
5-
"voting_period": "60s"
5+
"voting_period": "60s",
6+
"expedited_vote_period": "60s"
67
}
78
},
89
"accounts": [

0 commit comments

Comments
 (0)