Fixed bug where logging could crash client during tx adding

This commit is contained in:
obscuren
2015-01-02 22:19:58 +01:00
parent 5c82fdc243
commit 16f417f5af
5 changed files with 24 additions and 24 deletions

View File

@ -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())
}
}
}