Further flag_index revert

This commit is contained in:
Dankrad Feist 2021-05-05 22:22:32 +01:00
parent 77524036f5
commit b041a9b0d6
1 changed files with 2 additions and 2 deletions

View File

@ -481,8 +481,8 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
proposer_reward_numerator = 0 proposer_reward_numerator = 0
for index in get_attesting_indices(state, data, attestation.aggregation_bits): for index in get_attesting_indices(state, data, attestation.aggregation_bits):
for flag_index, weight in enumerate(PARTICIPATION_FLAG_WEIGHTS): for flag_index, weight in enumerate(PARTICIPATION_FLAG_WEIGHTS):
if flag_index in participation_flag_indices and not epoch_participation[index][flag_index]: if flag_index in participation_flag_indices and not has_flag(epoch_participation[index], flag_index):
epoch_participation[index][flag_index] = True epoch_participation[index] = add_flag(epoch_participation[index], flag_index)
proposer_reward_numerator += get_base_reward(state, index) * weight proposer_reward_numerator += get_base_reward(state, index) * weight
# Reward proposer # Reward proposer