|
|
@ -3,7 +3,6 @@ package filter |
|
|
|
// TODO make use of the generic filtering system
|
|
|
|
// TODO make use of the generic filtering system
|
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"sync" |
|
|
|
"sync" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/core" |
|
|
|
"github.com/ethereum/go-ethereum/core" |
|
|
@ -75,7 +74,6 @@ out: |
|
|
|
case event := <-events.Chan(): |
|
|
|
case event := <-events.Chan(): |
|
|
|
switch event := event.(type) { |
|
|
|
switch event := event.(type) { |
|
|
|
case core.ChainEvent: |
|
|
|
case core.ChainEvent: |
|
|
|
fmt.Println("filter start") |
|
|
|
|
|
|
|
self.filterMu.RLock() |
|
|
|
self.filterMu.RLock() |
|
|
|
for _, filter := range self.filters { |
|
|
|
for _, filter := range self.filters { |
|
|
|
if filter.BlockCallback != nil { |
|
|
|
if filter.BlockCallback != nil { |
|
|
@ -83,7 +81,6 @@ out: |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
self.filterMu.RUnlock() |
|
|
|
self.filterMu.RUnlock() |
|
|
|
fmt.Println("filter stop") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case core.PendingBlockEvent: |
|
|
|
case core.PendingBlockEvent: |
|
|
|
self.filterMu.RLock() |
|
|
|
self.filterMu.RLock() |
|
|
|