aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go
index f2d2eaf1c..f89f68c9d 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -744,8 +744,7 @@ func (pm *ProtocolManager) BroadcastTxs(txs types.Transactions) {
func (pm *ProtocolManager) minedBroadcastLoop() {
// automatically stops if unsubscribe
for obj := range pm.minedBlockSub.Chan() {
- switch ev := obj.Data.(type) {
- case core.NewMinedBlockEvent:
+ if ev, ok := obj.Data.(core.NewMinedBlockEvent); ok {
pm.BroadcastBlock(ev.Block, true) // First propagate block to peers
pm.BroadcastBlock(ev.Block, false) // Only then announce to the rest
}