This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn process_attestation(...) { | |
... | |
// Update epoch participation flags | |
// @dev deviate from the order of the spec to avoid immutable borrow after mutable borrow | |
let attesting_indices = | |
get_attesting_indices(state, data, &attestation.aggregation_bits, context)?; | |
// @dev Create immutable reference to `{current_or_previous}_epoch_participation` | |
let epoch_participation = if is_current { | |
&state.current_epoch_participation |