Improve comments on the BFS loop block

This commit is contained in:
Brendan Abolivier 2018-11-07 10:09:41 +00:00
parent a37cc60e67
commit 585bfeda12
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -500,9 +500,9 @@ func (r *RoomserverQueryAPI) scanEventTree(
resultNIDs = make([]types.EventNID, 0, limit)
// Loop through the event IDs to retrieve the related events and go through
// the whole tree (up to the provided limit) using the events' "prev_event"
// key.
// Loop through the event IDs to retrieve the requested events and go
// through the whole tree (up to the provided limit) using the events'
// "prev_event" key.
BFSLoop:
for len(front) > 0 {
var next []string
@ -539,6 +539,7 @@ BFSLoop:
}
}
}
// Repeat the same process with the parent events we just processed.
front = next
}