This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Correctly filter out extremities with soft failed prevs #5274
Correctly filter out extremities with soft failed prevs #5274
Changes from 2 commits
c144389
18e35f5
06b5360
990a0c8
12fbcd1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding is that we start by checking the events themselves, rather than their prev events, for rejections. This description implies otherwise.
Also, the idea is that the first line is one-line description of the function (https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings). Can you try and make a one-liner, even if it's a bit opaque? ("Find transitive predecessors of some events, via rejections." ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this starts with the events we're about to persist and checks their prev events, and their prev events, etc. This is the opposite to
_get_events_which_are_prevs
which works in the other direction. Since we haven't persisted the new event yet we have to pass in their prev events and start from there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surely we should only do this if the event is not in existing_prevs, to save duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a check above if
prev_event_id in existing_prevs
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<- idiot