) -> ServerResult<Json<SatInscriptionJson>> { if !index.has_sat_index() { return Err(ServerError::NotFound( "this server has no sat index".to_string(), )); } let id = index.get_inscription_id_by_sat_indexed(sat, inscription_index)?; Ok(Json(SatInscriptionJson { id })) } async fn redirect_http_to_https( Extension(mut destination): Extension<String>, uri: Uri, ) -> Redirect { if let Some(path_and_query) = uri.path_and_query() { destination.push_str(path_and_query.as_str()); } Redirect::to(&destination) } } #[cfg(test)] mod tests { use { super::*, crate::runes::{Edict, Etching, Rune, Runestone}, reqwest::Url, serde::de::DeserializeOwned, std::net::TcpListener, }; const RUNE: u128 = 99246114928149462; struct TestServer { bitcoin_rpc_server: test_bitcoincore_rpc::Handle, index: Arc<Index>, ord_server_handle: Handle, url: Url, #[allow(unused)] tempdir: TempDir, } impl TestServer {
Inscription number 44,985,420
Genesis block 819,063
File type text
File size 1 KB
Creation date