diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-24 14:13:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 6f9f78e54ceb93db5495a3e15568efbfa9e5b25b (patch) | |
tree | 2bfc87b64a730a309667aaf103677e0547bc0637 | |
parent | 974da0184e48f9c393d4ac5974d692f2fe8751cb (diff) | |
download | go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar.gz go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar.bz2 go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar.lz go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar.xz go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.tar.zst go-tangerine-6f9f78e54ceb93db5495a3e15568efbfa9e5b25b.zip |
dex: reduce pullVote (#172)
-rw-r--r-- | dex/handler.go | 5 |
1 files changed, 3 insertions, 2 deletions
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) |