Skip reserving capacity in fetch_auth_chain helper containers for now.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2026-03-07 03:37:29 +00:00
parent 74a8fb7ed4
commit 449b80de1d

View File

@@ -126,10 +126,9 @@ async fn fetch_auth_chain(
// c. Ask origin server over federation
// We also handle its auth chain here so we don't get a stack overflow in
// handle_outlier_pdu.
let mut events_all = HashSet::new();
let mut events_in_reverse_order = Vec::new();
let mut todo_auth_events: VecDeque<_> = [event_id.to_owned()].into();
let mut events_in_reverse_order = Vec::with_capacity(todo_auth_events.len());
let mut events_all = HashSet::with_capacity(todo_auth_events.len());
while let Some(next_id) = todo_auth_events.pop_front() {
if events_all.contains(&next_id) {
continue;