mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +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
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- mirror
|
- mirror
|
||||||
- tenv
|
|
||||||
- misspell
|
- misspell
|
||||||
- reassign
|
- reassign
|
||||||
- revive # only certain checks enabled
|
- revive # only certain checks enabled
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -83,7 +83,7 @@ lint:
|
||||||
|
|
||||||
lintci-deps:
|
lintci-deps:
|
||||||
rm -f ./build/bin/golangci-lint
|
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
|
.PHONY: vulncheck
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,6 @@ var (
|
||||||
errInvalidNewChain = errors.New("invalid new chain")
|
errInvalidNewChain = errors.New("invalid new chain")
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
forkReadyInterval = 3 * time.Minute
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
bodyCacheLimit = 256
|
bodyCacheLimit = 256
|
||||||
blockCacheLimit = 256
|
blockCacheLimit = 256
|
||||||
|
|
@ -849,6 +845,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
|
||||||
bc.historyPrunePoint.Store(predefinedPoint)
|
bc.historyPrunePoint.Store(predefinedPoint)
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
// nolint:gosimple
|
||||||
case history.KeepPostMerge:
|
case history.KeepPostMerge:
|
||||||
if freezerTail == 0 && latest != 0 {
|
if freezerTail == 0 && latest != 0 {
|
||||||
// This is the case where a user is trying to run with --history.chain
|
// 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.
|
// SharedRange returns the block range shared by two chain views.
|
||||||
func (cv *ChainView) SharedRange(cv2 *ChainView) common.Range[uint64] {
|
func (cv *ChainView) SharedRange(cv2 *ChainView) common.Range[uint64] {
|
||||||
|
if cv == nil || cv2 == nil {
|
||||||
|
return common.Range[uint64]{}
|
||||||
|
}
|
||||||
|
|
||||||
cv.lock.Lock()
|
cv.lock.Lock()
|
||||||
defer cv.lock.Unlock()
|
defer cv.lock.Unlock()
|
||||||
|
|
||||||
if cv == nil || cv2 == nil || !cv.extendNonCanonical() || !cv2.extendNonCanonical() {
|
if !cv.extendNonCanonical() || !cv2.extendNonCanonical() {
|
||||||
return common.Range[uint64]{}
|
return common.Range[uint64]{}
|
||||||
}
|
}
|
||||||
var sharedLen uint64
|
var sharedLen uint64
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue