aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-01-24 14:13:45 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commit3c774363f4df8cad3e8aafa594c5f2b417b7330e (patch)
tree158b73a15360a3d89a65933248d3cde572f610b2 /dex
parent85b33e2cde141c918d091c44d3f810339b7752bf (diff)
downloadgo-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar.gz
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar.bz2
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar.lz
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar.xz
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.tar.zst
go-tangerine-3c774363f4df8cad3e8aafa594c5f2b417b7330e.zip
dex: reduce pullVote (#172)
Diffstat (limited to 'dex')
-rw-r--r--dex/handler.go5
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)