mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 20:02:43 +00:00
Optimisations and bug fixes for state advance
This commit is reasonably performant on Prater!
This commit is contained in:
@@ -141,9 +141,11 @@ pub mod altair {
|
||||
if participation_flag_indices.contains(&flag_index)
|
||||
&& !validator_participation.has_flag(flag_index)?
|
||||
{
|
||||
// FIXME(sproul): add effective balance cache here?
|
||||
validator_participation.add_flag(flag_index)?;
|
||||
let effective_balance = state.get_validator(index)?.effective_balance;
|
||||
proposer_reward_numerator.safe_add_assign(
|
||||
get_base_reward(state, index, total_active_balance, spec)?
|
||||
get_base_reward(effective_balance, total_active_balance, spec)?
|
||||
.safe_mul(weight)?,
|
||||
)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user