From 6c2a9f5f7ba9a42ce1fcfff56f4fdd53784cbbd5 Mon Sep 17 00:00:00 2001 From: Alex Sheverdin Date: Fri, 27 Sep 2024 16:31:08 +0100 Subject: [PATCH] Update to the new SGX check response --- skale_checks/checks/watchdog.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/skale_checks/checks/watchdog.py b/skale_checks/checks/watchdog.py index 44450d4..8dcb441 100644 --- a/skale_checks/checks/watchdog.py +++ b/skale_checks/checks/watchdog.py @@ -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