From 3c774363f4df8cad3e8aafa594c5f2b417b7330e Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Thu, 24 Jan 2019 14:13:45 +0800 Subject: dex: reduce pullVote (#172) --- dex/handler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dex') diff --git a/dex/handler.go b/dex/handler.go index b8b39c6f4..df5516f62 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -79,7 +79,8 @@ const ( recordChanSize = 10240 - maxPullPeers = 3 + maxPullPeers = 3 + maxPullVotePeers = 1 pullVoteRateLimit = 10 * time.Second ) @@ -1115,7 +1116,7 @@ func (pm *ProtocolManager) BroadcastPullVotes( round: pos.Round, } for idx, peer := range pm.peers.PeersWithLabel(label) { - if idx >= maxPullPeers { + if idx >= maxPullVotePeers { break } peer.AsyncSendPullVotes(pos) -- cgit v1.2.3