Don't override the neighbours.
This commit is contained in:
parent
3d03fe4076
commit
ffa6b551f4
@ -309,11 +309,11 @@ func (n *network) announce(client transport.Client) {
|
|||||||
nodes := make([]*pbNet.Node, len(n.neighbours))
|
nodes := make([]*pbNet.Node, len(n.neighbours))
|
||||||
i := 0
|
i := 0
|
||||||
for id, _ := range n.neighbours {
|
for id, _ := range n.neighbours {
|
||||||
pbNode := &pbNet.Node{
|
nodes[i] = &pbNet.Node{
|
||||||
Id: id,
|
Id: id,
|
||||||
Address: n.neighbours[id].address,
|
Address: n.neighbours[id].address,
|
||||||
}
|
}
|
||||||
nodes[i] = pbNode
|
i++
|
||||||
}
|
}
|
||||||
n.RUnlock()
|
n.RUnlock()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user