Unlock forkchoice store if attribute is empty (#13427)

* Unlock forkchoice store if attribute is empty

* Better version
This commit is contained in:
terence
2024-01-05 23:32:56 -08:00
committed by GitHub
parent a974627258
commit d055db1c31

View File

@@ -645,7 +645,7 @@ func (s *Service) lateBlockTasks(ctx context.Context) {
return
}
s.headLock.RUnlock()
s.cfg.ForkChoiceStore.RLock()
fcuArgs := &fcuConfig{
headState: headState,
headRoot: headRoot,
@@ -656,6 +656,7 @@ func (s *Service) lateBlockTasks(ctx context.Context) {
if fcuArgs.attributes.IsEmpty() {
return
}
s.cfg.ForkChoiceStore.RLock()
_, err = s.notifyForkchoiceUpdate(ctx, fcuArgs)
s.cfg.ForkChoiceStore.RUnlock()
if err != nil {