diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-03 05:19:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-03 05:19:58 +0800 |
commit | 16f417f5af16de8f1c2c140f8b249bd989200bd3 (patch) | |
tree | c0916e6cac3208a6a2ed889406a86ea3f71e433a /eth | |
parent | 5c82fdc2434c302a2b65a4c7f25fe91b22cd43df (diff) | |
download | dexon-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.go | 6 |
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()) + } } } |