Skip to content

Feat: Print websocket port on startup #351

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

4rjunc
Copy link

@4rjunc 4rjunc commented Apr 28, 2025

PR for #320
Screenshot 2025-04-28 at 9 53 15 AM

Greptile Summary

Enhanced startup messaging to display both RPC and WebSocket endpoint information, improving clarity by showing the conventional WebSocket port (RPC port + 1) during validator initialization.

  • Added WebSocket port calculation and display in /test-bins/src/rpc.rs (RPC port + 1)
  • Implemented formatted startup message with visual separators for better readability
  • Added clear endpoint URLs showing both HTTP RPC and WebSocket addresses
  • Added emoji indicators for better visual distinction between endpoints (📡 for RPC, 🔌 for WebSocket)

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 78 to 79
info!("📡 RPC endpoint: http://{:}:{}", rpc_host, rpc_port);
info!("🔌 WebSocket endpoint: ws://{}:{}", rpc_host, ws_port);
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Inconsistent formatting between RPC and WebSocket endpoints - one uses {:} and the other uses {}

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, pleas use {} for uniformity.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, LGTM! 🚀

Please address the comment and use the linter with make fmt and make lint and it's ready to be merged

Comment on lines 78 to 79
info!("📡 RPC endpoint: http://{:}:{}", rpc_host, rpc_port);
info!("🔌 WebSocket endpoint: ws://{}:{}", rpc_host, ws_port);
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, pleas use {} for uniformity.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

info!("");
info!("🧙 Magicblock Validator is running!");
info!("-----------------------------------");
info!("📡 RPC endpoint: http://{}:{}", rpc_host, rpc_port);
Copy link
Author

Choose a reason for hiding this comment

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

changed {:} -> {}

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.

2 participants