aboutsummaryrefslogtreecommitdiffstats
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 13:49:53 +0800
commit0d49afcb6e28be8cce82b004dc12b44364bf27ff (patch)
tree62940ab8dfac6db880c47b038e1f87abd501f5d4
parent89d2d2e8c6e08d0b0331900db5e46226607d46b6 (diff)
downloaddexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar.gz
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar.bz2
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar.lz
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar.xz
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.tar.zst
dexon-0d49afcb6e28be8cce82b004dc12b44364bf27ff.zip
hack: temp fix for running tests
-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)
}
}