mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Improve comments on the BFS loop block
This commit is contained in:
parent
a37cc60e67
commit
585bfeda12
|
|
@ -500,9 +500,9 @@ func (r *RoomserverQueryAPI) scanEventTree(
|
||||||
|
|
||||||
resultNIDs = make([]types.EventNID, 0, limit)
|
resultNIDs = make([]types.EventNID, 0, limit)
|
||||||
|
|
||||||
// Loop through the event IDs to retrieve the related events and go through
|
// Loop through the event IDs to retrieve the requested events and go
|
||||||
// the whole tree (up to the provided limit) using the events' "prev_event"
|
// through the whole tree (up to the provided limit) using the events'
|
||||||
// key.
|
// "prev_event" key.
|
||||||
BFSLoop:
|
BFSLoop:
|
||||||
for len(front) > 0 {
|
for len(front) > 0 {
|
||||||
var next []string
|
var next []string
|
||||||
|
|
@ -539,6 +539,7 @@ BFSLoop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Repeat the same process with the parent events we just processed.
|
||||||
front = next
|
front = next
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue