aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-11-05 10:31:43 +0800
committerGitHub <noreply@github.com>2018-11-05 10:31:43 +0800
commit740c5775e4fe97eaacd8c8bfe8f39076018565ab (patch)
treec44e32992e00259bbec828dd96cddbe4590de9e7 /core/consensus.go
parentc6db0b2491c8869b37ec6c8bc1a1264a1e4bfe7f (diff)
downloaddexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar.gz
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar.bz2
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar.lz
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar.xz
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.tar.zst
dexon-consensus-740c5775e4fe97eaacd8c8bfe8f39076018565ab.zip
core: Fix BA stuffs (#293)
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/consensus.go b/core/consensus.go
index c781de1..5c9823b 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -430,7 +430,10 @@ func (con *Consensus) Run(initBlock *types.Block) {
for {
<-con.tickerObj.Tick()
for _, tick := range ticks {
- go func(tick chan struct{}) { tick <- struct{}{} }(tick)
+ select {
+ case tick <- struct{}{}:
+ default:
+ }
}
}
}