Skip to content

Commit

Permalink
Disable event check (#18)
Browse files Browse the repository at this point in the history

* fn comment
  • Loading branch information
transmissions12 authored Mar 21, 2023
1 parent 29251e5 commit e3ca3ff
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions eth/filters/filter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func NewEventSystem(sys *FilterSystem, lightMode bool) *EventSystem {
}

// Subscribe events
m.txsSub = m.backend.SubscribeNewTxsEvent(m.txsCh)
// m.txsSub = m.backend.SubscribeNewTxsEvent(m.txsCh)
m.logsSub = m.backend.SubscribeLogsEvent(m.logsCh)
m.rmLogsSub = m.backend.SubscribeRemovedLogsEvent(m.rmLogsCh)
m.chainSub = m.backend.SubscribeChainEvent(m.chainCh)
Expand Down Expand Up @@ -452,11 +452,11 @@ func (es *EventSystem) handleRemovedLogs(filters filterIndex, ev core.RemovedLog
}
}

func (es *EventSystem) handleTxsEvent(filters filterIndex, ev core.NewTxsEvent) {
for _, f := range filters[PendingTransactionsSubscription] {
f.txs <- ev.Txs
}
}
// func (es *EventSystem) handleTxsEvent(filters filterIndex, ev core.NewTxsEvent) {
// for _, f := range filters[PendingTransactionsSubscription] {
// f.txs <- ev.Txs
// }
// }

func (es *EventSystem) handleChainEvent(filters filterIndex, ev core.ChainEvent) {
for _, f := range filters[BlocksSubscription] {
Expand Down Expand Up @@ -553,7 +553,7 @@ func (es *EventSystem) lightFilterLogs(header *types.Header, addresses []common.
func (es *EventSystem) eventLoop() {
// Ensure all subscriptions get cleaned up
defer func() {
es.txsSub.Unsubscribe()
// es.txsSub.Unsubscribe()
es.logsSub.Unsubscribe()
es.rmLogsSub.Unsubscribe()
es.pendingLogsSub.Unsubscribe()
Expand All @@ -567,8 +567,8 @@ func (es *EventSystem) eventLoop() {

for {
select {
case ev := <-es.txsCh:
es.handleTxsEvent(index, ev)
// case ev := <-es.txsCh:
// es.handleTxsEvent(index, ev)
case ev := <-es.logsCh:
es.handleLogs(index, ev)
case ev := <-es.rmLogsCh:
Expand Down

0 comments on commit e3ca3ff

Please sign in to comment.