aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-12-11 02:02:14 +0800
committerFelix Lange <fjl@twurst.com>2017-01-25 23:25:57 +0800
commit9b62facdd4bdabfed5ef98d131686c4d2606083a (patch)
tree1bd02cd071988eef4a5772917951b793bf1f7e15 /eth
parentf1069a30b9ca13769ace154ff25dfabc83f25485 (diff)
downloadgo-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar.gz
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar.bz2
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar.lz
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar.xz
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.tar.zst
go-tangerine-9b62facdd4bdabfed5ef98d131686c4d2606083a.zip
event: deprecate TypeMux and related types
The Subscription type is gone, all uses are replaced by *TypeMuxSubscription. This change is prep-work for the introduction of the new Subscription type in a later commit. gorename -from '"github.com/ethereum/go-ethereum/event"::Event' -to TypeMuxEvent gorename -from '"github.com/ethereum/go-ethereum/event"::muxsub' -to TypeMuxSubscription gofmt -w -r 'Subscription -> *TypeMuxSubscription' ./event/*.go find . -name '*.go' -and -not -regex '\./vendor/.*' \| xargs gofmt -w -r 'event.Subscription -> *event.TypeMuxSubscription'
Diffstat (limited to 'eth')
-rw-r--r--eth/filters/filter_system.go4
-rw-r--r--eth/handler.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go
index e0ee2ff51..3adf8111a 100644
--- a/eth/filters/filter_system.go
+++ b/eth/filters/filter_system.go
@@ -74,7 +74,7 @@ type subscription struct {
// subscription which match the subscription criteria.
type EventSystem struct {
mux *event.TypeMux
- sub event.Subscription
+ sub *event.TypeMuxSubscription
backend Backend
lightMode bool
lastHead *types.Header
@@ -277,7 +277,7 @@ func (es *EventSystem) SubscribePendingTxEvents(hashes chan common.Hash) *Subscr
type filterIndex map[Type]map[rpc.ID]*subscription
// broadcast event to filters that match criteria.
-func (es *EventSystem) broadcast(filters filterIndex, ev *event.Event) {
+func (es *EventSystem) broadcast(filters filterIndex, ev *event.TypeMuxEvent) {
if ev == nil {
return
}
diff --git a/eth/handler.go b/eth/handler.go
index 63ba0821f..691fc0677 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -78,8 +78,8 @@ type ProtocolManager struct {
SubProtocols []p2p.Protocol
eventMux *event.TypeMux
- txSub event.Subscription
- minedBlockSub event.Subscription
+ txSub *event.TypeMuxSubscription
+ minedBlockSub *event.TypeMuxSubscription
// channels for fetcher, syncer, txsyncLoop
newPeerCh chan *peer