Skip to content

Commit 60ac2b6

Browse files
authored
Problem: missing assert in balance check for versiondb test (backport #872) (#873)
1 parent 43e96a4 commit 60ac2b6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

integration_tests/test_versiondb.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ def test_versiondb_migration(cronos: Cronos):
2323
- node1 don't support historical queries
2424
"""
2525
w3 = cronos.w3
26-
balance0 = w3.eth.get_balance(ADDRS["community"])
26+
community = ADDRS["community"]
27+
balance0 = w3.eth.get_balance(community)
2728
block0 = w3.eth.block_number
2829

2930
tx = {
3031
"from": ADDRS["validator"],
31-
"to": ADDRS["community"],
32+
"to": community,
3233
"value": 1000,
3334
}
3435
send_transaction(w3, tx)
35-
balance1 = w3.eth.get_balance(ADDRS["community"])
36+
balance1 = w3.eth.get_balance(community)
3637
block1 = w3.eth.block_number
3738

3839
# stop the network first
@@ -73,20 +74,20 @@ def test_versiondb_migration(cronos: Cronos):
7374
wait_for_port(ports.evmrpc_port(cronos.base_port(0)))
7475
wait_for_port(ports.evmrpc_port(cronos.base_port(1)))
7576

76-
w3.eth.get_balance(ADDRS["community"], block_identifier=block0) == balance0
77-
w3.eth.get_balance(ADDRS["community"], block_identifier=block1) == balance1
78-
w3.eth.get_balance(ADDRS["community"]) == balance1
77+
assert w3.eth.get_balance(community, block_identifier=block0) == balance0
78+
assert w3.eth.get_balance(community, block_identifier=block1) == balance1
79+
assert w3.eth.get_balance(community) == balance1
7980

8081
# check query still works, node1 don't enable versiondb,
8182
# so we are testing iavl query here.
8283
w3_1 = cronos.node_w3(1)
83-
assert w3_1.eth.get_balance(ADDRS["community"]) == balance1
84+
assert w3_1.eth.get_balance(community) == balance1
8485

8586
# check the chain is still growing
8687
send_transaction(
8788
w3,
8889
{
89-
"from": ADDRS["community"],
90+
"from": community,
9091
"to": ADDRS["validator"],
9192
"value": 1000,
9293
},

0 commit comments

Comments
 (0)