mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-03 17:54:28 +00:00
state_processing: nicer attestation swap
This commit is contained in:
parent
e4bbcd333a
commit
137afa9131
@ -250,11 +250,8 @@ pub fn process_final_updates<T: EthSpec>(
|
||||
}
|
||||
|
||||
// Rotate current/previous epoch attestations
|
||||
std::mem::swap(
|
||||
&mut state.previous_epoch_attestations,
|
||||
&mut state.current_epoch_attestations,
|
||||
);
|
||||
state.current_epoch_attestations = vec![];
|
||||
state.previous_epoch_attestations =
|
||||
std::mem::replace(&mut state.current_epoch_attestations, vec![]);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user