Bug fix: skip sending sync message if the peer is not in our graph
This commit is contained in:
parent
dcd925f1e5
commit
c67ef7e017
@ -1270,7 +1270,8 @@ func (n *network) manage() {
|
|||||||
peers := n.Peers()
|
peers := n.Peers()
|
||||||
// pick a random peer from the list of peers and request full sync
|
// pick a random peer from the list of peers and request full sync
|
||||||
peer := n.node.GetPeerNode(peers[rnd.Intn(len(peers))].Id())
|
peer := n.node.GetPeerNode(peers[rnd.Intn(len(peers))].Id())
|
||||||
if peer != nil {
|
// skip if we can't find randmly selected peer
|
||||||
|
if peer == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user