@@ -2,7 +2,7 @@ use crate::attestation_storage::AttestationRef;
22use crate :: max_cover:: MaxCover ;
33use crate :: reward_cache:: RewardCache ;
44use state_processing:: common:: {
5- altair , base, get_attestation_participation_flag_indices, get_attesting_indices,
5+ base, get_attestation_participation_flag_indices, get_attesting_indices,
66} ;
77use std:: collections:: HashMap ;
88use types:: {
@@ -30,7 +30,7 @@ impl<'a, T: EthSpec> AttMaxCover<'a, T> {
3030 if let BeaconState :: Base ( ref base_state) = state {
3131 Self :: new_for_base ( att, state, base_state, total_active_balance, spec)
3232 } else {
33- Self :: new_for_altair_deneb ( att, state, reward_cache, total_active_balance , spec)
33+ Self :: new_for_altair_deneb ( att, state, reward_cache, spec)
3434 }
3535 }
3636
@@ -72,7 +72,6 @@ impl<'a, T: EthSpec> AttMaxCover<'a, T> {
7272 att : AttestationRef < ' a , T > ,
7373 state : & BeaconState < T > ,
7474 reward_cache : & ' a RewardCache ,
75- total_active_balance : u64 ,
7675 spec : & ChainSpec ,
7776 ) -> Option < Self > {
7877 let att_data = att. attestation_data ( ) ;
@@ -81,8 +80,6 @@ impl<'a, T: EthSpec> AttMaxCover<'a, T> {
8180 let att_participation_flags =
8281 get_attestation_participation_flag_indices ( state, & att_data, inclusion_delay, spec)
8382 . ok ( ) ?;
84- let base_reward_per_increment =
85- altair:: BaseRewardPerIncrement :: new ( total_active_balance, spec) . ok ( ) ?;
8683
8784 let fresh_validators_rewards = att
8885 . indexed
@@ -98,12 +95,7 @@ impl<'a, T: EthSpec> AttMaxCover<'a, T> {
9895
9996 let mut proposer_reward_numerator = 0 ;
10097
101- // FIXME(sproul): store base_reward in reward cache
102- // let effective_balance = reward_cache.get_effective_balance(index)?;
103- let effective_balance = state. get_effective_balance ( index as usize ) . ok ( ) ?;
104- let base_reward =
105- altair:: get_base_reward ( effective_balance, base_reward_per_increment, spec)
106- . ok ( ) ?;
98+ let base_reward = state. get_base_reward ( index as usize ) . ok ( ) ?;
10799
108100 for ( flag_index, weight) in PARTICIPATION_FLAG_WEIGHTS . iter ( ) . enumerate ( ) {
109101 if att_participation_flags. contains ( & flag_index) {
0 commit comments