mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
bump golangci to v2 and fixed lints
This commit is contained in:
parent
990e128817
commit
ef31b7bc03
4 changed files with 7 additions and 7 deletions
|
|
@ -15,7 +15,6 @@ linters:
|
|||
- govet
|
||||
- ineffassign
|
||||
- mirror
|
||||
- tenv
|
||||
- misspell
|
||||
- reassign
|
||||
- revive # only certain checks enabled
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -83,7 +83,7 @@ lint:
|
|||
|
||||
lintci-deps:
|
||||
rm -f ./build/bin/golangci-lint
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.63.4
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v2.1.5
|
||||
|
||||
.PHONY: vulncheck
|
||||
|
||||
|
|
|
|||
|
|
@ -115,10 +115,6 @@ var (
|
|||
errInvalidNewChain = errors.New("invalid new chain")
|
||||
)
|
||||
|
||||
var (
|
||||
forkReadyInterval = 3 * time.Minute
|
||||
)
|
||||
|
||||
const (
|
||||
bodyCacheLimit = 256
|
||||
blockCacheLimit = 256
|
||||
|
|
@ -849,6 +845,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
|
|||
bc.historyPrunePoint.Store(predefinedPoint)
|
||||
return nil
|
||||
|
||||
// nolint:gosimple
|
||||
case history.KeepPostMerge:
|
||||
if freezerTail == 0 && latest != 0 {
|
||||
// This is the case where a user is trying to run with --history.chain
|
||||
|
|
|
|||
|
|
@ -122,10 +122,14 @@ func (cv *ChainView) RawReceipts(number uint64) types.Receipts {
|
|||
|
||||
// SharedRange returns the block range shared by two chain views.
|
||||
func (cv *ChainView) SharedRange(cv2 *ChainView) common.Range[uint64] {
|
||||
if cv == nil || cv2 == nil {
|
||||
return common.Range[uint64]{}
|
||||
}
|
||||
|
||||
cv.lock.Lock()
|
||||
defer cv.lock.Unlock()
|
||||
|
||||
if cv == nil || cv2 == nil || !cv.extendNonCanonical() || !cv2.extendNonCanonical() {
|
||||
if !cv.extendNonCanonical() || !cv2.extendNonCanonical() {
|
||||
return common.Range[uint64]{}
|
||||
}
|
||||
var sharedLen uint64
|
||||
|
|
|
|||
Loading…
Reference in a new issue