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

IndexTable::find_entry: add assertion bound checking #175

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

Tpt
Copy link
Contributor

@Tpt Tpt commented Jan 30, 2023

Allows to avoid a bound check on each read_entry call

Allows to avoid a bound check on each `read_entry` call
@Tpt Tpt requested review from cheme and arkpar and removed request for cheme January 30, 2023 19:43
@Tpt Tpt mentioned this pull request Jan 30, 2023
2 tasks
@arkpar arkpar requested a review from cheme January 31, 2023 22:43
Copy link
Collaborator

@cheme cheme left a comment

Choose a reason for hiding this comment

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

Did not see the linked issue the other day, makes sense. Probably not needed for plan_insert_chunk (buffer size known).

Maybe a comment would be good, no comment alternative would be to change chunk parameter to &[u8; CHUNK_SIZE] and unsafe cast before calling find_entry.

@arkpar arkpar merged commit 6ab6f45 into paritytech:master Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants