Skip to content

Commit

Permalink
no need to hash it again (#13261)
Browse files Browse the repository at this point in the history
  • Loading branch information
nisdas authored Dec 5, 2023
1 parent ce23443 commit 705e98e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions beacon-chain/operations/attestations/kv/unaggregated.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,11 @@ func (c *AttCaches) DeleteSeenUnaggregatedAttestations() (int, error) {
defer c.unAggregateAttLock.Unlock()

count := 0
for _, att := range c.unAggregatedAtt {
for r, att := range c.unAggregatedAtt {
if att == nil || helpers.IsAggregated(att) {
continue
}
if seen, err := c.hasSeenBit(att); err == nil && seen {
r, err := hashFn(att)
if err != nil {
return count, errors.Wrap(err, "could not tree hash attestation")
}
delete(c.unAggregatedAtt, r)
count++
}
Expand Down

0 comments on commit 705e98e

Please sign in to comment.