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

Basic support for responding to HashRequest #969

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

Mivik
Copy link
Contributor

@Mivik Mivik commented Aug 29, 2024

This PR implemented serialization of Hashes and HashReject messages, and the logic of responding to HashRequest. Note that some code relevant to Piece is changed and should be reviewed.

Mivik added 2 commits August 29, 2024 17:15
Also Piece.hasPieceLayer seems to be faulty so I tried fixing it
@anacrolix
Copy link
Owner

Thanks! Nice implementation. The implementation of hasPieceLayer looks correct. You've constrained the checks to v2 fields in the info but that makes sense. Were you seeing performance issues with the old implementation, or just tidying up?

@anacrolix
Copy link
Owner

Ok I tested it pretty well.

@anacrolix anacrolix merged commit 285cfd3 into anacrolix:master Aug 30, 2024
9 of 10 checks passed
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