diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 15:24:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 3b9878984fad7c7bf2c055342366b0c22a76126c (patch) | |
tree | d5c77ab9621d9c88334c78ad36a60d3e0526194c | |
parent | b403e40f7ee8b09ab9e8a6bcd2c6eb9056dfd48b (diff) | |
download | dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar.gz dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar.bz2 dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar.lz dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar.xz dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.tar.zst dexon-3b9878984fad7c7bf2c055342366b0c22a76126c.zip |
hack: temp fix for running tests
-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 671b2f63f..0e14e2fc6 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) } } |