Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to the new SGX check response #27

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions skale_checks/checks/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,14 @@ def sgx(self) -> OptionalBoolTuple:
if not sgx_response.is_status_ok():
return None, None
sgx_data = sgx_response.payload
is_sgx_working = (sgx_data['status'] == 0 and
sgx_data['status_name'] == SGX_CONNECTED_STATUS)
status_zmg = sgx_data.get('status_zmq', None)
status_https = sgx_data.get('status_https', None)
if status_zmg is None and status_https is None:
status_zmg = sgx_data.get('status', None)
status_https = sgx_data.get('status_name', None)
is_sgx_working = status_zmg == 0 and status_https == SGX_CONNECTED_STATUS
else:
is_sgx_working = status_zmg is True and status_https is True
sgx_version_check = sgx_data['sgx_wallet_version'] in self.requirements['versions']['sgx']
return is_sgx_working, sgx_version_check

Expand Down
Loading