Make if condition more precise

This commit is contained in:
Ben Edgington 2021-03-27 16:13:46 +00:00
parent 54279f9e3b
commit 64fc912ce7

View File

@ -461,7 +461,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
# Participation flag indices
participation_flag_indices = []
if is_matching_head and is_matching_target and state.slot <= data.slot + MIN_ATTESTATION_INCLUSION_DELAY:
if is_matching_head and is_matching_target and state.slot == data.slot + MIN_ATTESTATION_INCLUSION_DELAY:
participation_flag_indices.append(TIMELY_HEAD_FLAG_INDEX)
if is_matching_source and state.slot <= data.slot + integer_squareroot(SLOTS_PER_EPOCH):
participation_flag_indices.append(TIMELY_SOURCE_FLAG_INDEX)