Skip to content

fix: do not read extra block if offset = at+childSize#50

Merged
hacdias merged 4 commits intomainfrom
fix/reading-too-many-blocks
Jun 2, 2023
Merged

fix: do not read extra block if offset = at+childSize#50
hacdias merged 4 commits intomainfrom
fix/reading-too-many-blocks

Conversation

@hacdias
Copy link
Member

@hacdias hacdias commented Jun 2, 2023

Thanks to @aschmahmann for finding this bug. The issue is that if offset == at+childSize, we would be reading an unnecessary block.

Needed in the context of IPIP-402 (ipfs/boxo#303). We were getting one unnecessary block. I added a test, which fails without the fix.

@hacdias hacdias requested a review from aschmahmann June 2, 2023 12:54
@hacdias hacdias marked this pull request as ready for review June 2, 2023 13:49
@hacdias hacdias self-assigned this Jun 2, 2023
@hacdias hacdias requested a review from willscott June 2, 2023 13:51
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Suggested version: v1.7.1

Comparing to: v1.7.0 (diff)

Changes in go.mod file(s):

(empty)

gorelease says:

# summary
Suggested version: v1.7.1

gocompat says:

Your branch is up to date with 'origin/main'.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to main. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

@hacdias hacdias merged commit 1f8efba into main Jun 2, 2023
@hacdias hacdias deleted the fix/reading-too-many-blocks branch June 2, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants