aboutsummaryrefslogtreecommitdiffstats
path: root/eth/filters
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-06 13:54:25 +0800
committerEgon Elbre <egonelbre@gmail.com>2017-08-08 00:54:20 +0800
commit8f06b7980dd2b6023ee7657d28da5567cdda4fcc (patch)
tree8b67d622446f9ae874df555e41a5709c99ce3431 /eth/filters
parent971079822ee6c12d9348ec78f212fe91c9b83edf (diff)
downloaddexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar.gz
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar.bz2
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar.lz
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar.xz
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.tar.zst
dexon-8f06b7980dd2b6023ee7657d28da5567cdda4fcc.zip
eth: fix megacheck warnings
Diffstat (limited to 'eth/filters')
-rw-r--r--eth/filters/api.go1
-rw-r--r--eth/filters/filter.go3
-rw-r--r--eth/filters/filter_system.go1
-rw-r--r--eth/filters/filter_system_test.go7
4 files changed, 4 insertions, 8 deletions
diff --git a/eth/filters/api.go b/eth/filters/api.go
index 61647a5d0..fff58a268 100644
--- a/eth/filters/api.go
+++ b/eth/filters/api.go
@@ -54,7 +54,6 @@ type PublicFilterAPI struct {
backend Backend
useMipMap bool
mux *event.TypeMux
- quit chan struct{}
chainDb ethdb.Database
events *EventSystem
filtersMu sync.Mutex
diff --git a/eth/filters/filter.go b/eth/filters/filter.go
index 0a0b81224..f27b76929 100644
--- a/eth/filters/filter.go
+++ b/eth/filters/filter.go
@@ -20,7 +20,6 @@ import (
"context"
"math"
"math/big"
- "time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
@@ -42,8 +41,6 @@ type Filter struct {
backend Backend
useMipMap bool
- created time.Time
-
db ethdb.Database
begin, end int64
addresses []common.Address
diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go
index 7abace1e6..ab0b7473e 100644
--- a/eth/filters/filter_system.go
+++ b/eth/filters/filter_system.go
@@ -74,7 +74,6 @@ type subscription struct {
// subscription which match the subscription criteria.
type EventSystem struct {
mux *event.TypeMux
- sub *event.TypeMuxSubscription
backend Backend
lightMode bool
lastHead *types.Header
diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go
index 822580b56..23e6d66e1 100644
--- a/eth/filters/filter_system_test.go
+++ b/eth/filters/filter_system_test.go
@@ -18,6 +18,7 @@ package filters
import (
"context"
+ "fmt"
"math/big"
"reflect"
"testing"
@@ -439,15 +440,15 @@ func TestPendingLogsSubscription(t *testing.T) {
}
if len(fetched) != len(tt.expected) {
- t.Fatalf("invalid number of logs for case %d, want %d log(s), got %d", i, len(tt.expected), len(fetched))
+ panic(fmt.Sprintf("invalid number of logs for case %d, want %d log(s), got %d", i, len(tt.expected), len(fetched)))
}
for l := range fetched {
if fetched[l].Removed {
- t.Errorf("expected log not to be removed for log %d in case %d", l, i)
+ panic(fmt.Sprintf("expected log not to be removed for log %d in case %d", l, i))
}
if !reflect.DeepEqual(fetched[l], tt.expected[l]) {
- t.Errorf("invalid log on index %d for case %d", l, i)
+ panic(fmt.Sprintf("invalid log on index %d for case %d", l, i))
}
}
}()