From 16b971dae2af6c6a7a12b882c2335fec29558e11 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Thu, 14 Dec 2023 17:27:41 +0800 Subject: [PATCH] Add back missing lock --- beacon-chain/rpc/core/validator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/beacon-chain/rpc/core/validator.go b/beacon-chain/rpc/core/validator.go index 9924b870cb4b..f7eb00e2e1c5 100644 --- a/beacon-chain/rpc/core/validator.go +++ b/beacon-chain/rpc/core/validator.go @@ -330,6 +330,7 @@ func (s *Service) GetAttestationData( s.AttestationCache.RLock() res, err := s.AttestationCache.Get(ctx) if err != nil { + s.AttestationCache.RUnlock() return nil, &RpcError{Reason: Internal, Err: errors.Errorf("could not retrieve data from attestation cache: %v", err)} } if res != nil && res.Slot == req.Slot {