@@ -504,10 +504,11 @@ def _update_log_direction(
504504 if self ._logs is None :
505505 return
506506
507+
507508 prev_address , prev_slot = calc_log_address (address , slot , - 1 )
508509 if self ._log_exists (prev_address , prev_slot ):
509510 timestamp_2 = self ._logs [prev_address ][prev_slot ].timestamp
510- if timestamp_2 == timestamp :
511+ if timestamp_2 == timestamp :
511512 # Given log is the second log with same timestamp,
512513 # mark direction as production
513514 self ._logs [address ][slot ].is_consumption = False
@@ -521,12 +522,12 @@ def _update_log_direction(
521522 elif self ._log_production is None :
522523 self ._log_production = False
523524
524- prev_prev_address , prev_prev_slot = calc_log_address (address , slot , - 2 )
525- if self ._log_exists (prev_prev_address , prev_prev_slot ):
526- timestamp_3 = self ._logs [prev_prev_address ][prev_prev_slot ].timestamp
527- self ._log_production = (
528- timestamp_2 == timestamp and timestamp_3 != timestamp
529- ) or (timestamp_2 == timestamp_3 and timestamp_2 != timestamp )
525+ prev_prev_address , prev_prev_slot = calc_log_address (address , slot , - 2 )
526+ if self ._log_exists (prev_prev_address , prev_prev_slot ):
527+ timestamp_3 = self ._logs [prev_prev_address ][prev_prev_slot ].timestamp
528+ self ._log_production = (
529+ timestamp_2 == timestamp and timestamp_3 != timestamp
530+ ) or (timestamp_2 == timestamp_3 and timestamp_2 != timestamp )
530531
531532 next_address , next_slot = calc_log_address (address , slot , 1 )
532533 if self ._log_exists (next_address , next_slot ):
0 commit comments