diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 15:24:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:39 +0800 |
commit | d98d417075933857ce77699f57d24fbee2a63334 (patch) | |
tree | 40a69248fef76e995f8c579be3a0686223d2801f | |
parent | 44660543773109a68dc70e9efa25126dc9453e50 (diff) | |
download | go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar.gz go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar.bz2 go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar.lz go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar.xz go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.tar.zst go-tangerine-d98d417075933857ce77699f57d24fbee2a63334.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 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) } } |