mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Fix some BeaconState API changes in state proc.
This commit is contained in:
@@ -19,7 +19,7 @@ pub fn initiate_validator_exit<T: EthSpec>(
|
||||
}
|
||||
|
||||
// Compute exit queue epoch
|
||||
let delayed_epoch = state.get_delayed_activation_exit_epoch(state.current_epoch(spec), spec);
|
||||
let delayed_epoch = state.get_delayed_activation_exit_epoch(state.current_epoch(), spec);
|
||||
let mut exit_queue_epoch = state
|
||||
.exit_cache
|
||||
.max_epoch()
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn exit_validator<T: EthSpec>(
|
||||
return Err(Error::UnknownValidator);
|
||||
}
|
||||
|
||||
let delayed_epoch = state.get_delayed_activation_exit_epoch(state.current_epoch(spec), spec);
|
||||
let delayed_epoch = state.get_delayed_activation_exit_epoch(state.current_epoch(), spec);
|
||||
|
||||
if state.validator_registry[validator_index].exit_epoch > delayed_epoch {
|
||||
state.validator_registry[validator_index].exit_epoch = delayed_epoch;
|
||||
|
||||
@@ -14,7 +14,7 @@ pub fn slash_validator<T: EthSpec>(
|
||||
return Err(BeaconStateError::UnknownValidator);
|
||||
}
|
||||
|
||||
let current_epoch = state.current_epoch(spec);
|
||||
let current_epoch = state.current_epoch();
|
||||
|
||||
initiate_validator_exit(state, slashed_index, spec)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user