![](/_next/image?url=%2Fimages%2Fgradient-top-bg.png&w=1920&q=75)
let port = TcpListener::bind("127.0.0.1:0") .unwrap() .local_addr() .unwrap() .port(); let mut child = Command::new(executable_path("ord")) .args(format!( "--rpc-url {} --bitcoin-data-dir {} --data-dir {} server --http-port {port} --address 127.0.0.1", rpc_server.url(), tempdir.path().display(), tempdir.path().display()).to_args() ) .env("ORD_BITCOIN_RPC_PASS", "bar") .env("ORD_BITCOIN_RPC_USER", "foo") .env("ORD_INTEGRATION_TEST", "1") .current_dir(&tempdir) .spawn().unwrap(); for i in 0.. { match reqwest::blocking::get(format!("http://127.0.0.1:{port}/status")) { Ok(_) => break, Err(err) => { if i == 400 { panic!("Server failed to start: {err}"); } } } thread::sleep(Duration::from_millis(25)); } rpc_server.mine_blocks(1); for i in 0.. { let response = reqwest::blocking::get(format!("http://127.0.0.1:{port}/blockcount")).unwrap(); assert_eq!(response.status(), StatusCode::OK);
Inscription #44972024
Collection
Ord
Owner
bc1ppn2s0g...azqsxj94tyID
8655889a3e...4f95bbe0i0
Detail
History
Sign Up for our Newsletter
And be the first to know about any updates!