aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 78c2159c0..36c1ac30f 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -234,8 +234,10 @@ func (self *Ethereum) txBroadcastLoop() {
func (self *Ethereum) blockBroadcastLoop() {
// automatically stops if unsubscribe
for obj := range self.txSub.Chan() {
- event := obj.(core.NewMinedBlockEvent)
- self.server.Broadcast("eth", NewBlockMsg, event.Block.RlpData())
+ switch ev := obj.(type) {
+ case core.NewMinedBlockEvent:
+ self.server.Broadcast("eth", NewBlockMsg, ev.Block.RlpData())
+ }
}
}