Fix bugs in cross-committee aggregation

This commit is contained in:
Michael Sproul
2024-05-10 12:29:57 +10:00
parent 411fcee2ac
commit 437e8516cd
2 changed files with 113 additions and 90 deletions

View File

@@ -287,8 +287,10 @@ impl<E: EthSpec> OperationPool<E> {
// TODO(electra): Work out how to do this more elegantly. This is a bit of a hack.
let mut all_attestations = self.attestations.write();
all_attestations.aggregate_across_committees(prev_epoch_key);
all_attestations.aggregate_across_committees(curr_epoch_key);
if fork_name >= ForkName::Electra {
all_attestations.aggregate_across_committees(prev_epoch_key);
all_attestations.aggregate_across_committees(curr_epoch_key);
}
let all_attestations = parking_lot::RwLockWriteGuard::downgrade(all_attestations);