let port = TcpListener::bind("127.0.0.1:0") .unwrap() .local_addr() .unwrap() .port(); let url = Url::parse(&format!("http://127.0.0.1:{port}")).unwrap(); let config_args = match config { Some(config) => { let config_path = tempdir.path().join("ord.yaml"); fs::write(&config_path, config).unwrap(); format!("--config {}", config_path.display()) } None => "".to_string(), }; let (options, server) = parse_server_args(&format!( "ord --rpc-url {} --cookie-file {} --data-dir {} {config_args} {} server --http-port {} --address 127.0.0.1 {}", bitcoin_rpc_server.url(), cookiefile.to_str().unwrap(), tempdir.path().to_str().unwrap(), ord_args.join(" "), port, server_args.join(" "), )); let index = Arc::new(Index::open(&options).unwrap()); let ord_server_handle = Handle::new(); { let index = index.clone(); let ord_server_handle = ord_server_handle.clone();
Inscription number 44,986,854
Genesis block 819,064
File type text
File size 1.05 KB
Creation date