eth: fix megacheck warnings
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
Reference in New Issue
Block a user