Skip to content

Commit

Permalink
Update nodeos_forked_chain_test.py to use get_blocks_result_v1 instea…
Browse files Browse the repository at this point in the history
…d of get_blocks_result_v0
  • Loading branch information
linh2931 committed Mar 28, 2024
1 parent 789dfee commit 51e9379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/nodeos_forked_chain_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,11 @@ def getBlock(self, blockNum):
block_num = start_block_num
for i in data:
# fork can cause block numbers to be repeated
this_block_num = i['get_blocks_result_v0']['this_block']['block_num']
this_block_num = i['get_blocks_result_v1']['this_block']['block_num']
if this_block_num < block_num:
block_num = this_block_num
assert block_num == this_block_num, f"{block_num} != {this_block_num}"
assert isinstance(i['get_blocks_result_v0']['block'], str) # verify block in result
assert isinstance(i['get_blocks_result_v1']['block'], str) # verify block in result
block_num += 1
assert block_num-1 == end_block_num, f"{block_num-1} != {end_block_num}"

Expand Down

0 comments on commit 51e9379

Please sign in to comment.