Merge pull request #2499 from bas-vk/reorg-logs

eth/filters: ignore logs that don't match filter criteria on chain reorg
This commit is contained in:
Jeffrey Wilcke 2016-04-28 12:59:07 +02:00
commit 1b77d5090d

View File

@ -164,7 +164,7 @@ func (fs *FilterSystem) filterLoop() {
fs.filterMu.RLock() fs.filterMu.RLock()
for _, filter := range fs.logFilters { for _, filter := range fs.logFilters {
if filter.LogCallback != nil && !filter.created.After(event.Time) { if filter.LogCallback != nil && !filter.created.After(event.Time) {
for _, removedLog := range ev.Logs { for _, removedLog := range filter.FilterLogs(ev.Logs) {
filter.LogCallback(removedLog, true) filter.LogCallback(removedLog, true)
} }
} }