Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Convert static network id code to instance code #3368

Merged
merged 6 commits into from
Jul 10, 2021
Merged

Conversation

clemahieu
Copy link
Contributor

This change cleans up some of the static data related to the network id/magic number parsed in message headers. Originally the network the node would run on, test/dev/beta/live, was determined statically by a CMake variable. This was changed to be able to be overridden at runtime with the --network flag however many of the static variables remained which needed awkward workarounds to deal with.

@zhyatt zhyatt added the quality improvements This item indicates the need for or supplies changes that improve maintainability label Jul 6, 2021
@zhyatt zhyatt added this to the V23.0 milestone Jul 6, 2021
…d comment that said they should not be changed as there's no arithmetic done on the enum values.
…id/magic number parsed in message headers. Originally the network the node would run on, test/dev/beta/live, was determined statically by a CMake variable. This was changed to be able to be overridden at runtime with the --network flag however many of the static variables remained which needed awkward workarounds to deal with.

This moves the network id in to the network class and adds a stat counter for when messages are dropped for this reason.
@clemahieu clemahieu merged commit 390beb0 into develop Jul 10, 2021
@zhyatt zhyatt deleted the network_id branch October 1, 2021 00:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants