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

Fix RemoteBitfield findFirst edge case #517

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

HDegroote
Copy link
Contributor

No description provided.

@@ -27,3 +30,41 @@ test('set last bits in segment and findFirst', function (t) {
t.is(b.findFirst(false, 32766), 32768)
t.is(b.findFirst(false, 32767), 32768)
})

test('remote congituous length consistency (remote-bitfield findFirst edge case)', async function (t) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the test to the remote bitfield tests because it detects an issue with the bitfield logic, but since it's using the replicator API it could also live in test/remote-length.js

@HDegroote HDegroote changed the title (do not merge) illustrate remote-bitfield bug with contiguous length Fix RemoteBitfield findFirst edge case May 7, 2024
@HDegroote HDegroote marked this pull request as ready for review May 7, 2024 08:16
@mafintosh mafintosh merged commit 7624476 into main May 7, 2024
4 checks passed
@mafintosh mafintosh deleted the remote-bitfield-bug branch May 7, 2024 08:41
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.

2 participants