Merge pull request #3605 from fjl/event-feed
event: add new Subscription type and related utilities
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user