Compare commits

...

1 Commits

Author SHA1 Message Date
Manu NALEPA
29816ed9c8 Optimize memory management by invoking runtime.GC in forkchoiceUpdateWithExecution. 2026-02-26 09:58:55 +01:00

View File

@@ -3,6 +3,7 @@ package blockchain
import (
"context"
"fmt"
"runtime"
"time"
doublylinkedtree "github.com/OffchainLabs/prysm/v7/beacon-chain/forkchoice/doubly-linked-tree"
@@ -97,6 +98,9 @@ func (s *Service) forkchoiceUpdateWithExecution(ctx context.Context, args *fcuCo
ctx = trace.NewContext(s.ctx, span)
s.ForkChoicer().Lock()
defer s.ForkChoicer().Unlock()
runtime.GC()
_, err := s.notifyForkchoiceUpdate(ctx, args)
if err != nil {
log.WithError(err).Error("Could not notify forkchoice update")