skip proposer bonus if no attestation for v index

This commit is contained in:
Danny Ryan 2019-03-08 12:07:57 -07:00
parent 1210e8e8ca
commit f88db44e81
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 3 additions and 2 deletions

View File

@ -1946,6 +1946,7 @@ def compute_normal_justification_and_finalization_deltas(state: BeaconState) ->
else:
deltas[1][index] += get_base_reward(state, index)
# Proposer bonus
if index in get_attesting_indices(state, state.previous_epoch_attestations):
proposer_index = get_beacon_proposer_index(state, inclusion_slot(state, index))
deltas[0][proposer_index] += get_base_reward(state, index) // ATTESTATION_INCLUSION_REWARD_QUOTIENT
return deltas