Skip to content

Conversation

@dknopik
Copy link
Member

@dknopik dknopik commented Sep 10, 2025

Description

Notes & open questions

While "nice way" is very subjective, I believe this is the most straightforward solution.

One thing that I am unsure about: I embedded the ProtocolIdentity into PacketHeader, but we could also pass it in on calling encode. On one had, the identity is part of the header, so I believe this to be the logically adequate place, on the other hand, that is an additional 8 bytes of memory per packet.

Change checklist

  • Self-review
  • Documentation updates if relevant
  • Tests if relevant

@dknopik dknopik requested a review from AgeManning September 10, 2025 11:29
Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

Yes. This looks much nicer. I agree putting it in the packet header is probably the best way to go

@AgeManning AgeManning merged commit 17ba908 into sigp:master Sep 15, 2025
6 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.

Find a nice way to remove the generic type on Discv5 struct

2 participants