Skip to content

Commit 8a2383a

Browse files
committed
unbond
1 parent 3a8e76f commit 8a2383a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

integration_tests/test_basic.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
submit_gov_proposal,
3737
w3_wait_for_block,
3838
wait_for_block,
39+
wait_for_fn,
3940
wait_for_new_blocks,
4041
wait_for_port,
4142
)
@@ -1003,6 +1004,19 @@ def test_join_validator(cronos):
10031004
"max_change_rate": "10000000000000000",
10041005
}
10051006

1007+
def check_status(status):
1008+
return cli1.validator(val_addr)["status"] == status
1009+
1010+
wait_for_fn("check_status", lambda: check_status("BOND_STATUS_BONDED"))
1011+
res = cli1.unbond_amount(
1012+
val_addr,
1013+
f"{staked}stake",
1014+
cli1.address("validator"),
1015+
gas_prices=DEFAULT_GAS_PRICE,
1016+
)
1017+
assert res["code"] == 0
1018+
wait_for_fn("check_status", lambda: check_status("BOND_STATUS_UNBONDING"))
1019+
10061020

10071021
def test_block_stm_delete(cronos):
10081022
"""

0 commit comments

Comments
 (0)