No need to lock here since Topology read locks and makes copies

This commit is contained in:
Asim Aslam 2019-10-18 10:29:14 +01:00 committed by Milos Gajdos
parent 63fd8b9d1b
commit 5c38f38dd9
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -170,9 +170,6 @@ func (n *node) Nodes() []Node {
// GetPeerNode returns a node from node MaxDepth topology
// It returns nil if the peer was not found
func (n *node) GetPeerNode(id string) *node {
n.RLock()
defer n.RUnlock()
// get node topology up to MaxDepth
top := n.Topology(MaxDepth)