Skip to content

Make endianness of our feature flag bitfields more intuitive #542

@valentinewallace

Description

@valentinewallace

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions