Skip to content

Make endianness of our feature flag bitfields more intuitive #542

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

Closed
valentinewallace opened this issue Mar 10, 2020 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@valentinewallace
Copy link
Contributor

valentinewallace commented Mar 10, 2020

Currently, when we store feature flag bitfields in e.g. the Peer struct, we store them such that the bytes overall are in little-endian order, but each individual byte is big-endian.

I.e.:
peer.their_features: [[feature bit 7, feature bit 6, ... feature bit 1, feature bit 0], [feature bit 15, feature bit 14, ... feature bit 8], [feature bit 18... feature bit 16]]

It'd be more intuitive if each individual byte were also little-endian.

Mostly filing this for myself as a potential future refactor.

@valentinewallace valentinewallace added the enhancement New feature or request label Mar 10, 2020
@TheBlueMatt
Copy link
Collaborator

TheBlueMatt commented Mar 10, 2020 via email

@valentinewallace
Copy link
Contributor Author

Hmm ok, maybe not worth. Feel free to close!

@jkczyz
Copy link
Contributor

jkczyz commented May 1, 2020

Closing this since #590 should make this less problematic.

@jkczyz jkczyz closed this as completed May 1, 2020
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

No branches or pull requests

3 participants