aboutsummaryrefslogtreecommitdiffstats
path: root/event
diff options
context:
space:
mode:
Diffstat (limited to 'event')
-rw-r--r--event/filter/old_filter.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/event/filter/old_filter.go b/event/filter/old_filter.go
index 4c01572db..ab0127ffb 100644
--- a/event/filter/old_filter.go
+++ b/event/filter/old_filter.go
@@ -59,7 +59,7 @@ func (self *FilterManager) GetFilter(id int) *core.Filter {
func (self *FilterManager) filterLoop() {
// Subscribe to events
- events := self.eventMux.Subscribe(core.NewBlockEvent{}, state.Logs(nil))
+ events := self.eventMux.Subscribe(core.PendingBlockEvent{}, core.NewBlockEvent{}, state.Logs(nil))
out:
for {
@@ -77,6 +77,15 @@ out:
}
self.filterMu.RUnlock()
+ case core.PendingBlockEvent:
+ self.filterMu.RLock()
+ for _, filter := range self.filters {
+ if filter.PendingCallback != nil {
+ filter.PendingCallback(event.Block)
+ }
+ }
+ self.filterMu.RUnlock()
+
case state.Logs:
self.filterMu.RLock()
for _, filter := range self.filters {