add --miner option for version < 1.12
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 53s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m30s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m55s
Smoke Test / Run basic test suite (pull_request) Successful in 5m24s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 10m29s

This commit is contained in:
Roy Crihfield 2024-04-10 14:00:43 +08:00
parent 6c7fa5064a
commit a919e590e1

View File

@ -102,6 +102,13 @@ else
fi fi
fi fi
OTHER_OPTS=""
# miner options were removed in v1.12
GETH_VERSION=$(geth --version | grep -io '[0-9][0-9a-z.-]*')
if echo -e "$GETH_VERSION\n1.12" | sort -Vc; then
OTHER_OPTS="--miner.threads=1"
fi
$START_CMD \ $START_CMD \
--datadir="${CERC_ETH_DATADIR}" \ --datadir="${CERC_ETH_DATADIR}" \
--bootnodes="${ENODE}" \ --bootnodes="${ENODE}" \
@ -126,12 +133,12 @@ else
--cache.preimages \ --cache.preimages \
--syncmode=full \ --syncmode=full \
--mine \ --mine \
--miner.threads=1 \
--metrics \ --metrics \
--metrics.addr="0.0.0.0" \ --metrics.addr="0.0.0.0" \
--verbosity=${CERC_GETH_VERBOSITY:-3} \ --verbosity=${CERC_GETH_VERBOSITY:-3} \
--log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \ --log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \
--miner.etherbase="${ETHERBASE}" \ --miner.etherbase="${ETHERBASE}" \
${OTHER_OPTS} \
${STATEDIFF_OPTS} \ ${STATEDIFF_OPTS} \
& &