Skip to content

Commit

Permalink
update for evm sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
puppetninja committed Jul 31, 2024
1 parent 8de099a commit 96c41ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions charts/tezos/templates/octez-rollup-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
- name: sidecar
image: "{{ $.Values.images.octez }}"
imagePullPolicy: {{ $.Values.images_pull_policy }}
args:
- sidecar-evm
env:
- name: MY_POD_NAME
value: {{ $k }}
{{- end }}
initContainers:
- name: snapshot-downloader
Expand Down
5 changes: 3 additions & 2 deletions utils/sidecar-evm.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def health():
"params": ["latest", False],
"id": 1
}
r = requests.get("http://127.0.0.1:8545", payload=payload, timeout=NODE_CONNECT_TIMEOUT)
resp = requests.get("http://127.0.0.1:8545", payload=payload, timeout=NODE_CONNECT_TIMEOUT)
resp = resp.json()
except ConnectTimeout as e:
err = "Timeout connect to node, %s" % repr(e), 500
application.logger.error(err)
Expand All @@ -38,7 +39,7 @@ def health():
application.logger.error(err)
return err

latest_block = r.json()['timestamp']
latest_block = resp['timestamp']
current_timestamp = int(time.time())
time_diff = current_timestamp - latest_block_timestamp
if time_diff > AGE_LIMIT_IN_SECS:
Expand Down

0 comments on commit 96c41ad

Please sign in to comment.