func attList.hasCoverage is unused
245}
246
247// hasCoverage returns true if a given coverage is found in attestations list.
248func (al attList) hasCoverage(coverage bitfield.Bitlist) (bool, error) {249 for _, att := range al {
250 x, err := att.GetAggregationBits().Xor(coverage)
251 if err != nil {
func attList.selectComplementUsingKeys is unused
224}
225
226// selectComplementUsingKeys returns only items with keys that are NOT specified.
227func (al attList) selectComplementUsingKeys(keys []int) attList {228 foundInKeys := func(key int) bool {
229 for i := 0; i < len(keys); i++ {
230 if keys[i] == key {
func attList.selectUsingKeys is unused
215}
216
217// selectUsingKeys returns only items with specified keys.
218func (al attList) selectUsingKeys(keys []int) attList {219 filtered := make([]interfaces.Attestation, len(keys))
220 for i, key := range keys {
221 filtered[i] = al[key]
func attList.merge is unused
210}
211
212// merge combines two attestation lists into one.
213func (al attList) merge(al1 attList) attList {214 return append(al, al1...)
215}
216
func attList.aggregate is unused
121}
122
123// aggregate returns list as an aggregated attestation.
124func (al attList) aggregate(coverage bitfield.Bitlist) (*ethpb.Attestation, error) {125 if len(al) < 2 {
126 return nil, errors.Wrap(ErrInvalidAttestationCount, "cannot aggregate")
127 }
Description
It is recommended to keep the codebase clean by removing unused code.
This part of the code has not been used anywhere in the project and is not exported. Maybe it was mistakenly left behind while refactoring or was intended to be used somewhere but remained unused by mistake.