// NewFilterSystem returns a newly allocated filter manager func NewFilterSystem(mux *event.TypeMux) *FilterSystem { fs := &FilterSystem{ filters: make(map[int]*Filter), created: make(map[int]time.Time), } fs.sub = mux.Subscribe( //core.PendingBlockEvent{}, core.ChainEvent{}, core.TxPreEvent{}, vm.Logs(nil), ) go fs.filterLoop() return fs }
// NewFilterSystem returns a newly allocated filter manager func NewFilterSystem(mux *event.TypeMux) *FilterSystem { fs := &FilterSystem{ chainFilters: make(map[int]*Filter), pendingTxFilters: make(map[int]*Filter), logFilters: make(map[int]*Filter), pendingLogFilters: make(map[int]*Filter), generic: make(map[int]*Filter), } fs.sub = mux.Subscribe( core.PendingLogsEvent{}, core.RemovedLogsEvent{}, core.ChainEvent{}, core.TxPreEvent{}, vm.Logs(nil), ) go fs.filterLoop() return fs }