Extension(index): Extension>, Path(height): Path, ) -> ServerResult { Ok( index .block_hash(Some(height))? .ok_or_not_found(|| "blockhash")? .to_string(), ) } async fn block_hash_from_height_json( Extension(index): Extension>, Path(height): Path, ) -> ServerResult> { Ok(Json( index .block_hash(Some(height))? .ok_or_not_found(|| "blockhash")? .to_string(), )) } async fn block_time(Extension(index): Extension>) -> ServerResult { Ok( index .block_time(index.block_height()?.ok_or_not_found(|| "blocktime")?)? .unix_timestamp() .to_string(), ) } async fn input( Extension(page_config): Extension>, Extension(index): Extension>, Path(path): Path<(u32, usize, usize)>, ) -> Result, ServerError> { let not_found = || format!("input /{}/{}/{}", path.0, path.1, path.2);