diff --git a/fork_choice_store/src/store.rs b/fork_choice_store/src/store.rs index 244e2f0..7681ab8 100644 --- a/fork_choice_store/src/store.rs +++ b/fork_choice_store/src/store.rs @@ -1275,14 +1275,30 @@ impl Store

{ }, ); - let committee = accessors::beacon_committee(&target_state, slot, index)?; + let committee = if let Some(committee_bits) = aggregate.committee_bits() { + let committee_indices = misc::get_committee_indices::

(*committee_bits); + + let mut committees = vec![]; + + for committee_index in committee_indices { + let committee = accessors::beacon_committee(&target_state, slot, committee_index)?; + + committees.extend(committee); + } + + committees.into() + } else { + accessors::beacon_committee(&target_state, slot, index)? + .into_iter() + .collect::>() + }; // > The aggregator's validator index is within the committee ensure!( - committee.into_iter().contains(&aggregator_index), + committee.contains(&aggregator_index), Error::AggregatorNotInCommittee { aggregate_and_proof, - committee: committee.into_iter().collect(), + committee, }, );