From a8b8039f7f442871abb1c3c906d4ff4f58d7f570 Mon Sep 17 00:00:00 2001 From: piersy Date: Wed, 11 Aug 2021 12:21:56 +0200 Subject: [PATCH] Re-instate prior timeout to retrieve latest block (#8505) The timeout was increased to 600 to overcome the time taken to process the txpool local txs, but due to the addition of the -txpool.nolocals flag that extended timeout is no longer required. --- packages/helm-charts/common/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helm-charts/common/templates/_helpers.tpl b/packages/helm-charts/common/templates/_helpers.tpl index 916eca6a37e..739222a848b 100644 --- a/packages/helm-charts/common/templates/_helpers.tpl +++ b/packages/helm-charts/common/templates/_helpers.tpl @@ -494,7 +494,7 @@ prometheus.io/port: "{{ $pprof.port | default 6060 }}" - "-c" - | if [ -d /root/.celo/celo/chaindata ]; then - lastBlockTimestamp=$(timeout 600 geth console --maxpeers 0 --light.maxpeers 0 --syncmode full --txpool.nolocals --exec "eth.getBlock(\"latest\").timestamp") + lastBlockTimestamp=$(timeout 120 geth console --maxpeers 0 --light.maxpeers 0 --syncmode full --txpool.nolocals --exec "eth.getBlock(\"latest\").timestamp") day=$(date +%s) diff=$(($day - $lastBlockTimestamp)) # If lastBlockTimestamp is older than 1 day old, pull the chaindata rather than using the current PVC.