Updated some documentation in eventmanager to reflect chronological pruning of events

checksum-failure-logging
EricLiu2000 2019-07-26 13:34:03 -04:00
parent 4654742046
commit b75536c4a2
1 changed files with 2 additions and 1 deletions

View File

@ -116,10 +116,11 @@ private:
/**
* If events is not full, add the event at the end
* Otherwise, remove the least significant events, push the event to the back and push a APIEvent::TooManyEvents to the back (in that order)
* Otherwise, remove the oldest event, push the event to the back and push a APIEvent::TooManyEvents to the back (in that order)
*/
void add_internal_event(APIEvent event) {
// Ensure the event list is at most exactly full (size of eventLimit - 1, leaving room for a potential APIEvent::TooManyEvents)
// Removes any events of type TooManyEvents from the end before checking to avoid duplicates.
enforceLimit();
// We are exactly full, either because the list was truncated or because we were simply full before