From 46dc141c6c3f578cc798cdee6cc88308c90db588 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 13 Sep 2019 19:50:33 +0300 Subject: [PATCH] network: enlarge address request queue Queuing one message is not reliable enough, the peer that gets it can fail to actually make a request, so make this queue a bit deeper to have a higher chance of success. --- pkg/network/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/network/server.go b/pkg/network/server.go index b2817a34d..61cf86da7 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -67,7 +67,7 @@ func NewServer(config ServerConfig, chain core.Blockchainer) *Server { chain: chain, id: rand.Uint32(), quit: make(chan struct{}), - addrReq: make(chan *Message, 1), + addrReq: make(chan *Message, minPeers), register: make(chan Peer), unregister: make(chan peerDrop), peers: make(map[Peer]bool),