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
|
// Rotate current/previous epoch attestations
|
||||||
std::mem::swap(
|
state.previous_epoch_attestations =
|
||||||
&mut state.previous_epoch_attestations,
|
std::mem::replace(&mut state.current_epoch_attestations, vec![]);
|
||||||
&mut state.current_epoch_attestations,
|
|
||||||
);
|
|
||||||
state.current_epoch_attestations = vec![];
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user