-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Satoshi Endpoint Proxy #4021
Comments
If the async fn sat_inscription_at_index(
Extension(index): Extension<Arc<Index>>,
Extension(server_config): Extension<Arc<ServerConfig>>,
Path((DeserializeFromStr(sat), inscription_index)): Path<(DeserializeFromStr<Sat>, isize)>,
) -> ServerResult<Json<api::SatInscription>> {
task::block_in_place(|| {
if !index.has_sat_index() {
return if let Some(proxy) = server_config.proxy.as_ref() {
Self::proxy(proxy, &format!("r/sat/{}/at/{}", sat, inscription_index))
} else {
Err(ServerError::NotFound(
"this server has no sat index".to_string(),
))
};
}
let id = index.get_inscription_id_by_sat_indexed(sat, inscription_index)?;
if id.is_none() {
if let Some(proxy) = server_config.proxy.as_ref() {
return Self::proxy(proxy, &format!("r/sat/{}/at/{}", sat, inscription_index));
}
}
Ok(Json(api::SatInscription { id }))
})
} |
Yes, this is a good idea. I even have an issue for this #3806 |
Oh oops, sorry! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
server --proxy
option is helpful for testing mainnet inscriptions' behavior locally, but a lot of inscriptions that require such testing rely on a specific dynamically inscribed ordinal, which is usually uninscribed locally, and breaks testability.I wonder whether allowing the
--proxy
option to also apply as a fallback for the/r/sat/:sat/at/:index
endpoint might be worth pursuing? That should help with resolving dynamic content.The text was updated successfully, but these errors were encountered: