diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-24 05:59:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-24 05:59:19 +0800 |
commit | 0ee0094cc02e81d3a9f5b00cd7cdd421ee069492 (patch) | |
tree | 46a350004fb700c1cd8f88224c92f1c639c6ed6b /eth/backend.go | |
parent | 7b8a47f4846cd821ecc1f96e381980f7bca1922b (diff) | |
download | go-tangerine-0ee0094cc02e81d3a9f5b00cd7cdd421ee069492.tar.gz go-tangerine-0ee0094cc02e81d3a9f5b00cd7cdd421ee069492.tar.zst go-tangerine-0ee0094cc02e81d3a9f5b00cd7cdd421ee069492.zip |
better block propagation
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go index 446f06531..3f7f7c2cb 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -355,7 +355,7 @@ func (s *Ethereum) Start() error { go s.txBroadcastLoop() // broadcast mined blocks - s.blockSub = s.eventMux.Subscribe(core.NewMinedBlockEvent{}) + s.blockSub = s.eventMux.Subscribe(core.ChainHeadEvent{}) go s.blockBroadcastLoop() servlogger.Infoln("Server started") @@ -421,7 +421,7 @@ func (self *Ethereum) blockBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.blockSub.Chan() { switch ev := obj.(type) { - case core.NewMinedBlockEvent: + case core.ChainHeadEvent: self.net.Broadcast("eth", NewBlockMsg, []interface{}{ev.Block, ev.Block.Td}) } } |