show TIDs in correct order on pds calls

This commit is contained in:
Evan Jarrett
2025-12-31 13:49:24 -06:00
parent 88998904d6
commit cd6928ec4a
+3 -3
View File
@@ -607,9 +607,9 @@ func (h *XRPCHandler) HandleListRecords(w http.ResponseWriter, r *http.Request)
}
}
// Handle reverse order if requested
if reverse && len(records) > 0 {
// Reverse the slice
// Default order is newest-first (reverse chronological), which requires
// reversing the MST's lexicographic order. When reverse=true, keep MST order.
if !reverse && len(records) > 0 {
for i, j := 0, len(records)-1; i < j; i, j = i+1, j-1 {
records[i], records[j] = records[j], records[i]
}