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

Merged
merged 5 commits into from
Apr 30, 2025
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
14 changes: 14 additions & 0 deletions test-bins/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ async fn main() {
None => info!("Using default config. Override it by passing the path to a config file."),
};
info!("Starting validator with config:\n{}", config);
// Add a more developer-friendly startup message
const WS_PORT_OFFSET: u16 = 1;
let rpc_port = config.rpc.port;
let ws_port = rpc_port + WS_PORT_OFFSET; // WebSocket port is typically RPC port + 1
let rpc_host = &config.rpc.addr;

info!("");
info!("🧙 Magicblock Validator is running!");
info!("-----------------------------------");
info!("📡 RPC endpoint: http://{}:{}", rpc_host, rpc_port);
info!("🔌 WebSocket endpoint: ws://{}:{}", rpc_host, ws_port);
info!("-----------------------------------");
info!("Ready for connections!");
info!("");

let validator_keypair = validator_keypair();

Expand Down
Loading