aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-03 05:19:58 +0800
committerobscuren <geffobscura@gmail.com>2015-01-03 05:19:58 +0800
commit16f417f5af16de8f1c2c140f8b249bd989200bd3 (patch)
treec0916e6cac3208a6a2ed889406a86ea3f71e433a /eth
parent5c82fdc2434c302a2b65a4c7f25fe91b22cd43df (diff)
downloaddexon-16f417f5af16de8f1c2c140f8b249bd989200bd3.tar.gz
dexon-16f417f5af16de8f1c2c140f8b249bd989200bd3.tar.zst
dexon-16f417f5af16de8f1c2c140f8b249bd989200bd3.zip
Fixed bug where logging could crash client during tx adding
Diffstat (limited to 'eth')
-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())
+ }
}
}