mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 12:40:05 +00:00
do not use mutliple read locks (#3812)
This commit is contained in:
parent
635e20529a
commit
d8e70fe83c
@ -49,7 +49,7 @@ func Count() int {
|
||||
func Keys() []peer.ID {
|
||||
lock.RLock()
|
||||
defer lock.RUnlock()
|
||||
keys := make([]peer.ID, 0, Count())
|
||||
keys := make([]peer.ID, 0, len(peerStatuses))
|
||||
for k := range peerStatuses {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user