mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
minor optimize process_active_validator: avoid a call to state.get_validator (#4608)
This commit is contained in:
@@ -111,8 +111,8 @@ impl SingleEpochParticipationCache {
|
||||
current_epoch: Epoch,
|
||||
relative_epoch: RelativeEpoch,
|
||||
) -> Result<(), BeaconStateError> {
|
||||
let val_balance = state.get_effective_balance(val_index)?;
|
||||
let validator = state.get_validator(val_index)?;
|
||||
let val_balance = validator.effective_balance;
|
||||
|
||||
// Sanity check to ensure the validator is active.
|
||||
let epoch = relative_epoch.into_epoch(current_epoch);
|
||||
|
||||
Reference in New Issue
Block a user