diff --git a/core/filtermaps/matcher_test.go b/core/filtermaps/matcher_test.go index 5a49ce66ec..26d295913f 100644 --- a/core/filtermaps/matcher_test.go +++ b/core/filtermaps/matcher_test.go @@ -20,6 +20,7 @@ import ( "context" crand "crypto/rand" "math/rand" + "slices" "testing" "github.com/ethereum/go-ethereum/common" @@ -74,11 +75,8 @@ func TestMatcher(t *testing.T) { t.Fatalf("Log search error: %v", err) } var found bool - for _, l := range logs { - if l == log { - found = true - break - } + if slices.Contains(logs, log) { + found = true } if !found { t.Fatalf("Log search did not return expected log (addresses: %v, topics: %v, expected log: %v)", addresses, topics, *log)