aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-16 15:24:02 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:50 +0800
commitfe80dc1710b433b49897c65d16f5d57595683c17 (patch)
tree7c9976c55832b567938fb1a45e4c2ab665186fb1 /dex
parent17013051f2ece1924bd5fcdb46fb439671ee5dfd (diff)
downloaddexon-fe80dc1710b433b49897c65d16f5d57595683c17.tar.gz
dexon-fe80dc1710b433b49897c65d16f5d57595683c17.tar.zst
dexon-fe80dc1710b433b49897c65d16f5d57595683c17.zip
hack: temp fix for running tests
Diffstat (limited to 'dex')
-rw-r--r--dex/backend.go5
-rw-r--r--dex/handler.go8
2 files changed, 5 insertions, 8 deletions
diff --git a/dex/backend.go b/dex/backend.go
index 2d4c43547..81ac272a0 100644
--- a/dex/backend.go
+++ b/dex/backend.go
@@ -199,7 +199,10 @@ func (s *Dexon) Start(srvr *p2p.Server) error {
s.protocolManager.Start(srvr, maxPeers)
s.protocolManager.addSelfMeta()
- go s.consensus.Run()
+ go func() {
+ time.Sleep(10 * time.Second)
+ s.consensus.Run()
+ }()
return nil
}
diff --git a/dex/handler.go b/dex/handler.go
index a6a3627ec..276dd433c 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -823,13 +823,7 @@ func (pm *ProtocolManager) BroadcastMetas(metas []*NodeMeta) {
}
func (pm *ProtocolManager) BroadcastVote(vote *coreTypes.Vote) {
- label := peerLabel{
- set: notaryset,
- chainID: vote.Position.ChainID,
- round: vote.Position.Round,
- }
-
- for _, peer := range pm.peers.PeersWithoutVote(rlpHash(vote), label) {
+ for _, peer := range pm.peers.allPeers() {
peer.AsyncSendVote(vote)
}
}