From 55fdf3e46272ec50a4d55f519b542df790920306 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 20 Mar 2015 12:07:06 +0100 Subject: Listen to tx pre event and trigger 'pending' --- event/filter/eth_filter.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'event') diff --git a/event/filter/eth_filter.go b/event/filter/eth_filter.go index cb75d7e1a..ab811e90e 100644 --- a/event/filter/eth_filter.go +++ b/event/filter/eth_filter.go @@ -62,8 +62,9 @@ func (self *FilterManager) GetFilter(id int) *core.Filter { func (self *FilterManager) filterLoop() { // Subscribe to events events := self.eventMux.Subscribe( - core.PendingBlockEvent{}, + //core.PendingBlockEvent{}, core.ChainEvent{}, + core.TxPreEvent{}, state.Logs(nil)) out: @@ -82,11 +83,11 @@ out: } self.filterMu.RUnlock() - case core.PendingBlockEvent: + case core.TxPreEvent: self.filterMu.RLock() for _, filter := range self.filters { if filter.PendingCallback != nil { - filter.PendingCallback(event.Block, event.Logs) + filter.PendingCallback(event.Tx) } } self.filterMu.RUnlock() -- cgit