mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 20:02:43 +00:00
Split validator into ValidatorMutable
This commit is contained in:
@@ -104,13 +104,13 @@ pub fn process_activations<T: EthSpec>(
|
||||
.get(index)
|
||||
.copied()
|
||||
.ok_or(Error::BalancesOutOfBounds(index))?;
|
||||
validator.effective_balance = std::cmp::min(
|
||||
validator.mutable.effective_balance = std::cmp::min(
|
||||
balance.safe_sub(balance.safe_rem(spec.effective_balance_increment)?)?,
|
||||
spec.max_effective_balance,
|
||||
);
|
||||
if validator.effective_balance == spec.max_effective_balance {
|
||||
validator.activation_eligibility_epoch = T::genesis_epoch();
|
||||
validator.activation_epoch = T::genesis_epoch();
|
||||
if validator.effective_balance() == spec.max_effective_balance {
|
||||
validator.mutable.activation_eligibility_epoch = T::genesis_epoch();
|
||||
validator.mutable.activation_epoch = T::genesis_epoch();
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user