Handle unaggregated attestations when decomposing (#15027)

This commit is contained in:
Radosław Kapka
2025-03-10 14:48:43 +01:00
committed by GitHub
parent 9a421a2feb
commit 6d89373583
3 changed files with 20 additions and 5 deletions

View File

@@ -503,6 +503,10 @@ func (s *Service) pruneCoveredElectraAttsFromPool(ctx context.Context, headState
if err = s.cfg.AttestationCache.DeleteCovered(a); err != nil {
return errors.Wrap(err, "could not delete covered attestation")
}
} else if !a.IsAggregated() {
if err = s.cfg.AttPool.DeleteUnaggregatedAttestation(a); err != nil {
return errors.Wrap(err, "could not delete unaggregated attestation")
}
} else if err = s.cfg.AttPool.DeleteAggregatedAttestation(a); err != nil {
return errors.Wrap(err, "could not delete aggregated attestation")
}