mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
eth/filters: simplify switches (#17267)
This commit is contained in:
parent
40ee6f87f0
commit
43f038dbac
1 changed files with 1 additions and 2 deletions
|
|
@ -338,8 +338,7 @@ func (es *EventSystem) broadcast(filters filterIndex, ev interface{}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case *event.TypeMuxEvent:
|
case *event.TypeMuxEvent:
|
||||||
switch muxe := e.Data.(type) {
|
if muxe, ok := e.Data.(core.PendingLogsEvent); ok {
|
||||||
case core.PendingLogsEvent:
|
|
||||||
for _, f := range filters[PendingLogsSubscription] {
|
for _, f := range filters[PendingLogsSubscription] {
|
||||||
if e.Time.After(f.created) {
|
if e.Time.After(f.created) {
|
||||||
if matchedLogs := filterLogs(muxe.Logs, nil, f.logsCrit.ToBlock, f.logsCrit.Addresses, f.logsCrit.Topics); len(matchedLogs) > 0 {
|
if matchedLogs := filterLogs(muxe.Logs, nil, f.logsCrit.ToBlock, f.logsCrit.Addresses, f.logsCrit.Topics); len(matchedLogs) > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue