mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-18 15:54:13 +00:00
Data Race on the background FCU call (#13602)
This commit is contained in:
parent
3d13c69ef3
commit
8a89173937
@ -73,6 +73,8 @@ func (s *Service) sendFCUWithAttributes(cfg *postBlockProcessConfig, fcuArgs *fc
|
|||||||
slotCtx, cancel := context.WithTimeout(context.Background(), slotDeadline)
|
slotCtx, cancel := context.WithTimeout(context.Background(), slotDeadline)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
cfg.ctx = slotCtx
|
cfg.ctx = slotCtx
|
||||||
|
s.cfg.ForkChoiceStore.RLock()
|
||||||
|
defer s.cfg.ForkChoiceStore.RUnlock()
|
||||||
if err := s.computePayloadAttributes(cfg, fcuArgs); err != nil {
|
if err := s.computePayloadAttributes(cfg, fcuArgs); err != nil {
|
||||||
log.WithError(err).Error("could not compute payload attributes")
|
log.WithError(err).Error("could not compute payload attributes")
|
||||||
return
|
return
|
||||||
@ -80,8 +82,6 @@ func (s *Service) sendFCUWithAttributes(cfg *postBlockProcessConfig, fcuArgs *fc
|
|||||||
if fcuArgs.attributes.IsEmpty() {
|
if fcuArgs.attributes.IsEmpty() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.cfg.ForkChoiceStore.RLock()
|
|
||||||
defer s.cfg.ForkChoiceStore.RUnlock()
|
|
||||||
if _, err := s.notifyForkchoiceUpdate(cfg.ctx, fcuArgs); err != nil {
|
if _, err := s.notifyForkchoiceUpdate(cfg.ctx, fcuArgs); err != nil {
|
||||||
log.WithError(err).Error("could not update forkchoice with payload attributes for proposal")
|
log.WithError(err).Error("could not update forkchoice with payload attributes for proposal")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user