From 6dfde159b5403a31d8e8ca8d8002b458043fe10e Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 17 Dec 2024 17:21:53 +0800 Subject: [PATCH] Revert "test create_validator" This reverts commit eef37b5a17f3cc6a4b6367e94094b72b30e1f19d. --- integration_tests/configs/default.jsonnet | 2 +- integration_tests/test_basic.py | 48 +---------------------- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/integration_tests/configs/default.jsonnet b/integration_tests/configs/default.jsonnet index 7786b40e5b..dddcb55af0 100644 --- a/integration_tests/configs/default.jsonnet +++ b/integration_tests/configs/default.jsonnet @@ -31,7 +31,7 @@ }, }, validators: [{ - coins: '2000000000000000000stake,10000000000000000000000basetcro', + coins: '1000000000000000000stake,10000000000000000000000basetcro', staked: '1000000000000000000stake', mnemonic: '${VALIDATOR1_MNEMONIC}', client_config: { diff --git a/integration_tests/test_basic.py b/integration_tests/test_basic.py index f69ce15873..efbf9e8585 100644 --- a/integration_tests/test_basic.py +++ b/integration_tests/test_basic.py @@ -11,7 +11,7 @@ from hexbytes import HexBytes from pystarport import cluster, ports -from .cosmoscli import DEFAULT_GAS_PRICE, CosmosCLI, module_address +from .cosmoscli import CosmosCLI, module_address from .network import Geth from .utils import ( ADDRS, @@ -946,52 +946,6 @@ def test_submit_send_enabled(cronos, tmp_path): assert cli.query_bank_send(*denoms) == send_enable -def test_join_validator(cronos): - chain_id = cronos.config["chain_id"] - data = Path(cronos.base_dir).parent - clustercli = cluster.ClusterCLI(data, cmd="cronosd", chain_id=chain_id) - moniker = "new joined" - i = clustercli.create_node(moniker=moniker) - cli1 = clustercli.cosmos_cli(i) - staked = 1000000000000000000 - amt = 50000000000000000 - coin = f"{staked}stake,{amt}basetcro" - cli = cronos.cosmos_cli() - addr = cli1.address("validator") - res = cli.transfer(cli.address("validator"), addr, coin) - assert res["code"] == 0 - assert cli.balance(addr) == amt - # start the node - clustercli.supervisor.startProcess(f"{chain_id}-node{i}") - wait_for_block(clustercli.cosmos_cli(i), cli.block_height() + 1) - # wait for the new node to sync - wait_for_block(cli1, cli1.block_height()) - count1 = len(cli1.validators()) - # create validator tx - res = cli1.create_validator( - f"{staked}stake", - { - "moniker": moniker, - }, - gas_prices=DEFAULT_GAS_PRICE, - ) - assert res["code"] == 0 - assert ( - len(cli1.validators()) == count1 + 1 - ), "new validator should joined successfully" - val_addr = cli1.address("validator", bech="val") - val = cli1.validator(val_addr) - assert not val.get("jailed") - assert val["status"] == "BOND_STATUS_BONDED" - assert val["tokens"] == f"{staked}" - assert val["description"]["moniker"] == moniker - assert val["commission"]["commission_rates"] == { - "rate": "100000000000000000", - "max_rate": "200000000000000000", - "max_change_rate": "10000000000000000", - } - - def test_block_stm_delete(cronos): """ this test case revealed a bug in block-stm,