diff options
author | Oleg Kovalov <iamolegkovalov@gmail.com> | 2018-07-30 17:30:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-30 17:30:09 +0800 |
commit | d42ce0f2c1b52e26cce475e411d97165fb975577 (patch) | |
tree | 03043c37becf49145b23f4824f563e3443335698 /eth/filters | |
parent | 273c7a9dc4e8961e96e51bd8274436ff983a21ef (diff) | |
download | dexon-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.go | 3 |
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 { |