diff --git a/src/admin/debug/commands.rs b/src/admin/debug/commands.rs index e1fe9afd3..56d4efa5c 100644 --- a/src/admin/debug/commands.rs +++ b/src/admin/debug/commands.rs @@ -82,35 +82,6 @@ impl crate::Context<'_> { self.write_str(&message).await } - pub(super) async fn get_auth_chain(&self, event_id: OwnedEventId) -> Result { - let Ok(event) = self.services.rooms.timeline.get_pdu_json(&event_id).await else { - return Err!("Event not found."); - }; - - let room_id_str = event - .get("room_id") - .and_then(CanonicalJsonValue::as_str) - .ok_or_else(|| err!(Database("Invalid event in database")))?; - - let room_id = <&RoomId>::try_from(room_id_str) - .map_err(|_| err!(Database("Invalid room id field in event in database")))?; - - let start = Instant::now(); - let count = self - .services - .rooms - .auth_chain - .event_ids_iter(room_id, once(event_id.as_ref())) - .ready_filter_map(Result::ok) - .count() - .await; - - let elapsed = start.elapsed(); - let out = format!("Loaded auth chain with length {count} in {elapsed:?}"); - - self.write_str(&out).await - } - pub(super) async fn show_auth_chain(&self, event_id: OwnedEventId) -> Result { let node_status = async |event_id: &EventId, missing: bool| -> NodeStatus { if self diff --git a/src/admin/debug/mod.rs b/src/admin/debug/mod.rs index 1f75e70c9..e835f7c28 100644 --- a/src/admin/debug/mod.rs +++ b/src/admin/debug/mod.rs @@ -16,12 +16,6 @@ pub enum DebugCommand { message: Vec, }, - /// Loads the auth_chain of a PDU, reporting how long it took. - GetAuthChain { - /// An event ID (the $ character followed by the base64 reference hash) - event_id: OwnedEventId, - }, - /// Walks & displays the auth_chain of a PDU in a mermaid graph format. /// /// This is useless to basically anyone but developers, and is also probably