File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/pytest_plugins/consume/simulators/simulator_logic Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -419,11 +419,17 @@ def test_blockchain_via_sync(
419419 assert eth_rpc is not None , "eth_rpc is required"
420420 assert sync_eth_rpc is not None , "sync_eth_rpc is required"
421421
422- for attempt in range (3 ):
422+ for attempt in range (5 ):
423423 try :
424424 sync_block = sync_eth_rpc .get_block_by_hash (last_valid_block_hash )
425425 client_block = eth_rpc .get_block_by_hash (last_valid_block_hash )
426426
427+ if sync_block is None or client_block is None :
428+ raise LoggedError (
429+ f"Failed to retrieve block { last_valid_block_hash } "
430+ f"on attempt { attempt + 1 } "
431+ )
432+
427433 if sync_block ["stateRoot" ] != client_block ["stateRoot" ]:
428434 raise LoggedError (
429435 f"State root mismatch after sync. "
@@ -438,8 +444,9 @@ def test_blockchain_via_sync(
438444 f"Expected: { fixture .post_state_hash } , "
439445 f"Got: { sync_block ['stateRoot' ]} "
440446 )
447+ break
441448 except Exception as e :
442- if attempt < 2 :
449+ if attempt < 4 :
443450 time .sleep (1 )
444451 continue
445452 raise e
You can’t perform that action at this time.
0 commit comments