diff --git a/tests/ship_streamer_test.py b/tests/ship_streamer_test.py index 4f4719efc9..eb5e53242c 100755 --- a/tests/ship_streamer_test.py +++ b/tests/ship_streamer_test.py @@ -211,11 +211,14 @@ def getLatestSnapshot(nodeId): 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 args.finality_data_history else i['get_blocks_result_v0']['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 + if args.finality_data_history: + assert isinstance(i['get_blocks_result_v1']['block'], str) # verify block in result + else: + assert isinstance(i['get_blocks_result_v0']['block'], str) # verify block in result block_num += 1 assert block_num-1 == end_block_num, f"{block_num-1} != {end_block_num}" @@ -268,11 +271,14 @@ def getLatestSnapshot(nodeId): 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 args.finality_data_history else i['get_blocks_result_v0']['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']['deltas'], str) # verify deltas in result + if args.finality_data_history: + assert isinstance(i['get_blocks_result_v1']['deltas'], str) # verify deltas in result + else: + assert isinstance(i['get_blocks_result_v0']['deltas'], str) # verify deltas in result block_num += 1 assert block_num-1 == end_block_num, f"{block_num-1} != {end_block_num}"