From a919e590e1e23df1156e3d8e1eb370cf87700896 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 10 Apr 2024 14:00:43 +0800 Subject: [PATCH] add --miner option for version < 1.12 --- .../container-build/cerc-fixturenet-eth-geth/run-el.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/data/container-build/cerc-fixturenet-eth-geth/run-el.sh b/stack_orchestrator/data/container-build/cerc-fixturenet-eth-geth/run-el.sh index 7fcc6814..f84befd7 100755 --- a/stack_orchestrator/data/container-build/cerc-fixturenet-eth-geth/run-el.sh +++ b/stack_orchestrator/data/container-build/cerc-fixturenet-eth-geth/run-el.sh @@ -102,6 +102,13 @@ else 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 \ --datadir="${CERC_ETH_DATADIR}" \ --bootnodes="${ENODE}" \ @@ -126,12 +133,12 @@ else --cache.preimages \ --syncmode=full \ --mine \ - --miner.threads=1 \ --metrics \ --metrics.addr="0.0.0.0" \ --verbosity=${CERC_GETH_VERBOSITY:-3} \ --log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \ --miner.etherbase="${ETHERBASE}" \ + ${OTHER_OPTS} \ ${STATEDIFF_OPTS} \ &