diff --git a/.avalanche-golangci.yml b/.avalanche-golangci.yml index d029774226..3e7e195ef8 100644 --- a/.avalanche-golangci.yml +++ b/.avalanche-golangci.yml @@ -67,7 +67,7 @@ linters: - ineffassign - misspell - nakedret - # - nilerr + - nilerr - noctx - nolintlint - perfsprint diff --git a/plugin/evm/customtypes/rlp_fuzzer_test.go b/plugin/evm/customtypes/rlp_fuzzer_test.go index 99604f1246..d6227f6d82 100644 --- a/plugin/evm/customtypes/rlp_fuzzer_test.go +++ b/plugin/evm/customtypes/rlp_fuzzer_test.go @@ -44,8 +44,7 @@ import ( func decodeEncode(input []byte, val interface{}) error { if err := rlp.DecodeBytes(input, val); err != nil { - // not valid rlp, nothing to do - return nil + return nil //nolint:nilerr // not valid rlp, nothing to do } // If it _were_ valid rlp, we can encode it again output, err := rlp.EncodeToBytes(val) diff --git a/sync/statesync/trie_sync_tasks.go b/sync/statesync/trie_sync_tasks.go index 6791c99a6b..40f1075f3a 100644 --- a/sync/statesync/trie_sync_tasks.go +++ b/sync/statesync/trie_sync_tasks.go @@ -117,7 +117,7 @@ func (s *storageTrieTask) OnStart() (bool, error) { } storageTrie, err := trie.New(trie.StorageTrieID(s.sync.root, s.root, firstAccount), s.sync.trieDB) if err != nil { - return false, nil + return false, nil //nolint:nilerr // the storage trie does not exist, so it should be rerequested } // If the storage trie is already on disk, we only need to populate the storage snapshot for [accountHash]