mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Add lock to PeerStatusScorer.SetHeadSlot
(#10558)
(cherry picked from commit e04e4795c81ea939cf8996c632c52598cd69d170)
This commit is contained in:
parent
c8a7f6f0bd
commit
d371cd6e89
@ -145,5 +145,7 @@ func (s *PeerStatusScorer) peerStatus(pid peer.ID) (*pb.Status, error) {
|
||||
|
||||
// SetHeadSlot updates known head slot.
|
||||
func (s *PeerStatusScorer) SetHeadSlot(slot types.Slot) {
|
||||
s.store.Lock()
|
||||
defer s.store.Unlock()
|
||||
s.ourHeadSlot = slot
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user