Skip to content

Commit

Permalink
return true on error from hasSeenBit
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Feb 28, 2025
1 parent e16de08 commit 66c13f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beacon-chain/operations/attestations/kv/seen_bits.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ func (c *AttCaches) insertSeenBit(att ethpb.Att) error {
func (c *AttCaches) hasSeenBit(att ethpb.Att) (bool, error) {
id, err := attestation.NewId(att, attestation.Data)
if err != nil {
return false, errors.Wrap(err, "could not create attestation ID")
return true, errors.Wrap(err, "could not create attestation ID")
}

v, ok := c.seenAtt.Get(id.String())
if ok {
seenBits, ok := v.([]bitfield.Bitlist)
if !ok {
return false, errors.New("could not convert to bitlist type")
return true, errors.New("could not convert to bitlist type")
}
for _, bit := range seenBits {
if c, err := bit.Contains(att.GetAggregationBits()); err != nil {
Expand Down

0 comments on commit 66c13f3

Please sign in to comment.