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

ACP-77: Add subnetIDNodeID struct #3499

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

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Factored out of #3388.

How this works

Adds a struct to merge subnetIDs and nodeIDs together. This struct supports directly marshaling into bytes because it will be used as a key into the database.

How this was tested

  • Added fuzz tests.

Need to be documented in RELEASES.md?

No.

@StephenButtolph StephenButtolph added this to the v1.11.13 milestone Oct 25, 2024
@StephenButtolph StephenButtolph self-assigned this Oct 25, 2024
fz := fuzzer.NewFuzzer(data)
fz.Fill(&v0, &v1)

if v0.subnetID == v1.subnetID {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this return statement and if condition essential?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the subnetIDs are equal, then the comparison depends on the nodeIDs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog 🗄️
Development

Successfully merging this pull request may close these issues.

2 participants