diff --git a/Dockerfile b/Dockerfile index 7401d49198..6d20384ca6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG VERSION="" ARG BUILDNUM="" # Build Geth in a stock Go builder container -FROM golang:1.21-alpine as builder +FROM golang:1.20-alpine as builder RUN apk add --no-cache build-base libc-dev RUN apk add --no-cache gcc musl-dev linux-headers git diff --git a/core/opcodeCompiler/compiler/opcodeProcessor.go b/core/opcodeCompiler/compiler/opcodeProcessor.go index a5c04006e1..1058f53f11 100644 --- a/core/opcodeCompiler/compiler/opcodeProcessor.go +++ b/core/opcodeCompiler/compiler/opcodeProcessor.go @@ -52,7 +52,10 @@ func GetOpcodeProcessorInstance() *OpcodeProcessor { taskChannel: make(chan optimizeTask, taskChannelSize), } // start task processors. - taskNumber := max(runtime.NumCPU()*3/8, 1) + taskNumber := runtime.NumCPU() * 3 / 8 + if taskNumber < 1 { + taskNumber = 1 + } for i := 0; i < taskNumber; i++ { go opcodeProcessor.taskProcessor() diff --git a/go.mod b/go.mod index 034dedf77c..0edef69124 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,7 @@ module github.com/ethereum/go-ethereum -go 1.21 +go 1.20 -toolchain go1.21.4 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0