diff --git a/eth2/state_processing/src/per_epoch_processing.rs b/eth2/state_processing/src/per_epoch_processing.rs index 251dc3ec1..b8f459efd 100644 --- a/eth2/state_processing/src/per_epoch_processing.rs +++ b/eth2/state_processing/src/per_epoch_processing.rs @@ -250,11 +250,8 @@ pub fn process_final_updates( } // 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(()) }