-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pop duplicates entries when returning downloaded blocks in engine #3644
Conversation
Codecov Report
... and 202 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
smol nit
please also take a look @Rjected
while let Some(peek) = self.range_buffered_blocks.peek() { | ||
if peek.0 .0.hash() == block.0 .0.hash() { | ||
self.range_buffered_blocks.pop(); | ||
} else { | ||
break; | ||
} | ||
} |
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.
please use peek_mut
besides that, this is exactly what we want
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.
lgtm, just needs nightly formatting cargo +nightly fmt
#3629