From 2652d6cec00f758a6c193ec776d0970d404f71a0 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Thu, 13 Jul 2023 12:03:14 +0800 Subject: [PATCH] fix : lint --- eth/protocols/snap/sync_test.go | 2 ++ graphql/graphql.go | 1 + 2 files changed, 3 insertions(+) diff --git a/eth/protocols/snap/sync_test.go b/eth/protocols/snap/sync_test.go index 8005945d48..f1d1512d3b 100644 --- a/eth/protocols/snap/sync_test.go +++ b/eth/protocols/snap/sync_test.go @@ -1529,6 +1529,8 @@ func makeAccountTrieNoStorage(n int) (string, *trie.Trie, entrySlice) { var ( db = trie.NewDatabase(rawdb.NewMemoryDatabase()) accTrie = trie.NewEmpty(db) + + // nolint:prealloc entries entrySlice ) diff --git a/graphql/graphql.go b/graphql/graphql.go index 29f5a4faff..492e99db4d 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -541,6 +541,7 @@ func (t *Transaction) getLogs(ctx context.Context, hash common.Hash) (*[]*Log, e return nil, err } + // nolint:prealloc var ret []*Log // Select tx logs from all block logs ix := sort.Search(len(logs), func(i int) bool { return uint64(logs[i].TxIndex) >= t.index })