aboutsummaryrefslogtreecommitdiffstats
path: root/eth/filters
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2018-07-30 17:30:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-30 17:30:09 +0800
commitd42ce0f2c1b52e26cce475e411d97165fb975577 (patch)
tree03043c37becf49145b23f4824f563e3443335698 /eth/filters
parent273c7a9dc4e8961e96e51bd8274436ff983a21ef (diff)
downloaddexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.gz
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.bz2
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.lz
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.xz
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.zst
dexon-d42ce0f2c1b52e26cce475e411d97165fb975577.zip
all: simplify switches (#17267)
* all: simplify switches * silly mistake
Diffstat (limited to 'eth/filters')
-rw-r--r--eth/filters/filter_system.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go
index 4e999cda8..70139c1a9 100644
--- a/eth/filters/filter_system.go
+++ b/eth/filters/filter_system.go
@@ -338,8 +338,7 @@ func (es *EventSystem) broadcast(filters filterIndex, ev interface{}) {
}
}
case *event.TypeMuxEvent:
- switch muxe := e.Data.(type) {
- case core.PendingLogsEvent:
+ if muxe, ok := e.Data.(core.PendingLogsEvent); ok {
for _, f := range filters[PendingLogsSubscription] {
if e.Time.After(f.created) {
if matchedLogs := filterLogs(muxe.Logs, nil, f.logsCrit.ToBlock, f.logsCrit.Addresses, f.logsCrit.Topics); len(matchedLogs) > 0 {