From 9619a610248e9630968ba1d9be8e214b645c9c55 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Wed, 8 Nov 2017 11:45:52 +0100 Subject: all: gofmt -w -s (#15419) --- core/bloombits/matcher_test.go | 16 ++++++++-------- core/bloombits/scheduler_test.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'core/bloombits') diff --git a/core/bloombits/matcher_test.go b/core/bloombits/matcher_test.go index 0d8544136..4a31854c5 100644 --- a/core/bloombits/matcher_test.go +++ b/core/bloombits/matcher_test.go @@ -31,14 +31,14 @@ const testSectionSize = 4096 // Tests that wildcard filter rules (nil) can be specified and are handled well. func TestMatcherWildcards(t *testing.T) { matcher := NewMatcher(testSectionSize, [][][]byte{ - [][]byte{common.Address{}.Bytes(), common.Address{0x01}.Bytes()}, // Default address is not a wildcard - [][]byte{common.Hash{}.Bytes(), common.Hash{0x01}.Bytes()}, // Default hash is not a wildcard - [][]byte{common.Hash{0x01}.Bytes()}, // Plain rule, sanity check - [][]byte{common.Hash{0x01}.Bytes(), nil}, // Wildcard suffix, drop rule - [][]byte{nil, common.Hash{0x01}.Bytes()}, // Wildcard prefix, drop rule - [][]byte{nil, nil}, // Wildcard combo, drop rule - [][]byte{}, // Inited wildcard rule, drop rule - nil, // Proper wildcard rule, drop rule + {common.Address{}.Bytes(), common.Address{0x01}.Bytes()}, // Default address is not a wildcard + {common.Hash{}.Bytes(), common.Hash{0x01}.Bytes()}, // Default hash is not a wildcard + {common.Hash{0x01}.Bytes()}, // Plain rule, sanity check + {common.Hash{0x01}.Bytes(), nil}, // Wildcard suffix, drop rule + {nil, common.Hash{0x01}.Bytes()}, // Wildcard prefix, drop rule + {nil, nil}, // Wildcard combo, drop rule + {}, // Inited wildcard rule, drop rule + nil, // Proper wildcard rule, drop rule }) if len(matcher.filters) != 3 { t.Fatalf("filter system size mismatch: have %d, want %d", len(matcher.filters), 3) diff --git a/core/bloombits/scheduler_test.go b/core/bloombits/scheduler_test.go index 8a159c237..70772e4ab 100644 --- a/core/bloombits/scheduler_test.go +++ b/core/bloombits/scheduler_test.go @@ -60,7 +60,7 @@ func testScheduler(t *testing.T, clients int, fetchers int, requests int) { req.section, // Requested data req.section, // Duplicated data (ensure it doesn't double close anything) }, [][]byte{ - []byte{}, + {}, new(big.Int).SetUint64(req.section).Bytes(), new(big.Int).SetUint64(req.section).Bytes(), }) -- cgit v1.2.3