Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Aug 19, 2024
2 parents 81ab42f + f26b2cc commit 5fc7c4e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
test-upgrade:
runs-on: ubuntu-latest
steps:
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
with:
submodules: true
Expand Down
4 changes: 2 additions & 2 deletions app/docs/swagger_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ paths:
parameters:
- in: body
name: txBroadcast
description: The tx must be a signed StdTx. The supported broadcast modes include `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and `"async"`(return right away).
description: The tx must be a signed StdTx. The supported broadcast modes include `"block"`(return after tx commit), `"sync"`(return after CheckTx) and `"async"`(return right away).
required: true
schema:
type: object
Expand Down Expand Up @@ -524,7 +524,7 @@ paths:
sequence:
type: string
500:
description: Server internel error
description: Server internal error
/staking/delegators/{delegatorAddr}/delegations:
parameters:
- in: path
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ def test_statesync(cluster):

# discovery_time is set to 5 seconds, add extra seconds for processing
wait_for_block(cluster.cosmos_cli(i), 10)
print("succesfully syncing")
print("successfully syncing")
34 changes: 33 additions & 1 deletion integration_tests/test_gov.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_inherit_vote(cluster, tmp_path):

def test_host_enabled(cluster, tmp_path):
cli = cluster.cosmos_cli()
p = cluster.cosmos_cli().query_host_params()
p = cli.query_host_params()
assert p["host_enabled"]
p["host_enabled"] = False
proposal = tmp_path / "proposal.json"
Expand All @@ -247,3 +247,35 @@ def test_host_enabled(cluster, tmp_path):
approve_proposal(cluster, rsp, msg=msg)
p = cli.query_host_params()
assert not p["host_enabled"]


def test_gov_voting(cluster, tmp_path):
"""
- change voting_period from default 10s to 3m36s
"""
cli = cluster.cosmos_cli()
p = cli.query_params("gov")
assert p["params"]["voting_period"] == "10s"
updated = "3m36s"
p["params"]["voting_period"] = updated
proposal = tmp_path / "proposal.json"
authority = module_address("gov")
type = "/cosmos.gov.v1.MsgUpdateParams"
proposal_src = {
"messages": [
{
"@type": type,
"authority": authority,
"params": p["params"],
}
],
"deposit": "10000000basecro",
"title": "title",
"summary": "summary",
}
proposal.write_text(json.dumps(proposal_src))
rsp = cluster.submit_gov_proposal(proposal, from_="community")
assert rsp["code"] == 0, rsp["raw_log"]
approve_proposal(cluster, rsp, msg=f",{type}")
p = cli.query_params("gov")
assert p["params"]["voting_period"] == updated

0 comments on commit 5fc7c4e

Please sign in to comment.