diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 15:24:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | d7e1207ad870969dfa9612e882bc64ec30a7f71f (patch) | |
tree | 8be9f0a7ac16aea5765151a0b62b5bd3382dfe95 /dex | |
parent | 89d99563b957d0f88a5a2e8e8e13ada65cd1bbad (diff) | |
download | dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar.gz dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar.bz2 dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar.lz dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar.xz dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.tar.zst dexon-d7e1207ad870969dfa9612e882bc64ec30a7f71f.zip |
hack: temp fix for running tests
Diffstat (limited to 'dex')
-rw-r--r-- | dex/backend.go | 5 | ||||
-rw-r--r-- | dex/handler.go | 8 |
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) } } |