mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
event_graph: fix order of events sent to client, should be oldest to recent
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user