Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ pub struct Cli {
/// Override log format (json, pretty)
#[arg(long)]
pub log_format: Option<String>,

#[arg(short = 'p', long, default_value = "42069")]
pub port: u16,
}

impl Config {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async fn main() -> Result<()> {
);

tracing::info!("Block monitor initialized, starting main loop");
let addr: SocketAddr = "0.0.0.0:7878".parse().unwrap();
let addr: SocketAddr = format!("0.0.0.0:{}", cli.port).parse().unwrap();

let rpc_handle = tokio::spawn(RpcServer::new().start_server(addr));
// Run until cancelled
Expand Down