event_graph: fix order of events sent to client, should be oldest to recent

This commit is contained in:
oars
2025-09-24 15:54:44 +03:00
parent 71c0a37fb4
commit f6b01d378e

View File

@@ -594,7 +594,7 @@ impl EventGraph {
header_sorted.push(val);
}
}
header_sorted.sort_by(|x, y| y.layer.cmp(&x.layer));
header_sorted.sort_by(|x, y| x.layer.cmp(&y.layer));
info!(target: "event_graph::dag_sync()", "[EVENTGRAPH] Retrieving {} Events", header_sorted.len());
// Implement parallel download of events with a batch size
@@ -793,7 +793,7 @@ impl EventGraph {
for event in events {
let event_id = event.id();
if event.header.parents == NULL_PARENTS {
break
continue
}
debug!(
target: "event_graph::dag_insert()",
@@ -846,6 +846,9 @@ impl EventGraph {
// send out notifications about them
for event in events {
let event_id = event.id();
if event.header.parents == NULL_PARENTS {
continue
}
// Update the unreferenced DAG tips set
debug!(