From 705e98e3c3cc4fbaa24b507b2a8a9568f3e14152 Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Tue, 5 Dec 2023 18:59:01 +0800 Subject: [PATCH] no need to hash it again (#13261) --- beacon-chain/operations/attestations/kv/unaggregated.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/beacon-chain/operations/attestations/kv/unaggregated.go b/beacon-chain/operations/attestations/kv/unaggregated.go index 774744acc943..61d84abb403a 100644 --- a/beacon-chain/operations/attestations/kv/unaggregated.go +++ b/beacon-chain/operations/attestations/kv/unaggregated.go @@ -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++ }