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

[network] task: added apiNodeStatus field #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AnthonyLaw
Copy link
Member

What was the issue?

  • Add symbol node's apiNodeStatus field in symbolnodes.json files

What's the fix?

  • added a few methods in symbol client,
  • rest version, node health, and verify wss and https status.

Expected output:

{
    "apiNodeInfo": {
      "isHealth": true,
      "isHttpsEnable": true,
      "isWssEnable": true,
      "restVersion": "2.4.2"
    },
    "extraData": {
         ...existing filed
    },
    ....existing field
  },

def is_wss_valid(self):
try:
url = f'wss://{self.node_host}:3001/ws'
ws = create_connection(url, timeout=5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the import to import websocket and this into websocket.create_connection
(name is pretty generic, so it's nicer to use module-qualified name here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants