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

Add NewHeader constructor function. Remove duplicat functions MakeHea… #1579

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alexeykiselev
Copy link
Member

…der and buildHeader.

Use NewHeader everywhere is possible.

…der and buildHeader.

Use NewHeader everywhere is possible.
@alexeykiselev alexeykiselev added the enhancement New feature or request label Jan 9, 2025
@alexeykiselev alexeykiselev added wip This is a WIP, should not be merged right away do not merge The PR is not ready to be merged labels Jan 9, 2025
Add WriteTo and ReadFrom functions to message payloads.
Move message payload types to separate file payloads.go.
Add Header validation function.
Add ChecksumReader that wraps io.Reader and calculates checksum then reading payloads.
Functions ParseMessage, ReadMessage and WriteMessage made public.
ReadFrom functions of all messages reimplemented using ReadMessage function.
Fix linter issues. Unused functions removed.
Fixed read and write of BlockIDsPayload (list of BlockIDs).
Added PeersPayload.
Fixed writing of messages with empty payloads.
U8String moved to payloads.go.
Writing of all messages implemented usign function WriteMessage.
Unused BulkMessage type removed.
Test on mixed BlockIDs in GetBlockIDsMessage added.
TestProtocolMarshaling test reimplemented to check all possible ways of serialization/deserialization of messages and fixed to deserialize in empty structures.
@alexeykiselev alexeykiselev removed wip This is a WIP, should not be merged right away do not merge The PR is not ready to be merged labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant