mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-08-27 08:29:45 +00:00
fix: Address review comments
This commit is contained in:
@@ -224,8 +224,7 @@ async fn progress_state_and_extremities(
|
||||
.prev_events()
|
||||
.map(ToOwned::to_owned)
|
||||
.stream()
|
||||
.broad_filter_map(|prev_id| async move {
|
||||
let room_id = incoming_pdu.room_id_or_hash();
|
||||
.broad_filter_map(|prev_id| async {
|
||||
let (referenced, is_outlier, is_soft_failed, is_rejected) = tokio::join!(
|
||||
self.services
|
||||
.pdu_metadata
|
||||
@@ -248,11 +247,11 @@ async fn progress_state_and_extremities(
|
||||
incoming_pdu.prev_events().count(),
|
||||
start.elapsed(),
|
||||
);
|
||||
debug_assert!(!new_extremities.is_empty(), "resolved extremities cannot be empty");
|
||||
if new_extremities.is_empty() {
|
||||
return Err!("Resolved extremities cannot be empty");
|
||||
Err!("Resolved extremity set was empty after processing incoming event")
|
||||
} else {
|
||||
Ok(new_extremities.into_iter().collect())
|
||||
}
|
||||
Ok(new_extremities.into_iter().collect())
|
||||
}
|
||||
|
||||
/// Derives a new room state by adding the incoming PDU to the state before
|
||||
|
||||
Reference in New Issue
Block a user