aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-10-16 01:44:30 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-10-16 01:44:30 +0800
commitcefe5c80b1cdcab606a169c0be65d9d2ba9bc941 (patch)
treedbbb116fa71ee396fdeb743a725b14007b43e845 /eth/handler.go
parent2f1f2e4811a6f3094f99b55f6553fe27d83f9aad (diff)
parent402fd6e8c6a2e379351e0aae10a833fae6bcae6c (diff)
downloadgo-tangerine-cefe5c80b1cdcab606a169c0be65d9d2ba9bc941.tar.gz
go-tangerine-cefe5c80b1cdcab606a169c0be65d9d2ba9bc941.tar.zst
go-tangerine-cefe5c80b1cdcab606a169c0be65d9d2ba9bc941.zip
Merge pull request #1898 from karalabe/eventmux-post-race
core, eth, event, miner, xeth: fix event post / subscription race
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go
index fc92338b4..3fc909672 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -687,7 +687,7 @@ func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction)
func (self *ProtocolManager) minedBroadcastLoop() {
// automatically stops if unsubscribe
for obj := range self.minedBlockSub.Chan() {
- switch ev := obj.(type) {
+ switch ev := obj.Data.(type) {
case core.NewMinedBlockEvent:
self.BroadcastBlock(ev.Block, true) // First propagate block to peers
self.BroadcastBlock(ev.Block, false) // Only then announce to the rest
@@ -698,7 +698,7 @@ func (self *ProtocolManager) minedBroadcastLoop() {
func (self *ProtocolManager) txBroadcastLoop() {
// automatically stops if unsubscribe
for obj := range self.txSub.Chan() {
- event := obj.(core.TxPreEvent)
+ event := obj.Data.(core.TxPreEvent)
self.BroadcastTx(event.Tx.Hash(), event.Tx)
}
}