Skip to content
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

reth-stages: remove duplicate buf clear #11035

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

nkysg
Copy link
Contributor

@nkysg nkysg commented Sep 19, 2024

This place has clear.

pub fn encode_and_recover_unchecked(&self, buffer: &mut Vec<u8>) -> Option<Address> {
buffer.clear();
. Maybe we can remove the outside clear.

@nkysg nkysg changed the title reth-stages: remove duplicate clear reth-stages: remove duplicate buf clear Sep 19, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this is correct, because:

pub fn encode_and_recover_unchecked(&self, buffer: &mut Vec<u8>) -> Option<Address> {
buffer.clear();

I don't mind the explicit clear call here because this makes it obvious that we're clearing

defer to @joshieDo

@nkysg
Copy link
Contributor Author

nkysg commented Sep 19, 2024

while this is correct, because:

pub fn encode_and_recover_unchecked(&self, buffer: &mut Vec<u8>) -> Option<Address> {
buffer.clear();

I don't mind the explicit clear call here because this makes it obvious that we're clearing

defer to @joshieDo

so I think maybe we can remove the outside clear.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is properly documented so is fine

@mattsse mattsse added the A-staged-sync Related to staged sync (pipelines and stages) label Sep 19, 2024
@joshieDo joshieDo added this pull request to the merge queue Sep 19, 2024
Merged via the queue into paradigmxyz:main with commit 161c2d2 Sep 19, 2024
36 checks passed
@nkysg nkysg deleted the remove_dup_clear branch September 19, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-staged-sync Related to staged sync (pipelines and stages)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants