fix : lint

This commit is contained in:
Shivam Sharma 2023-07-13 12:03:14 +08:00
parent 0f32302313
commit 2652d6cec0
2 changed files with 3 additions and 0 deletions

View file

@ -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
)

View file

@ -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 })