Skip to content

Move node name registry to each module #106

@MegaRedHand

Description

@MegaRedHand

We currently have a name registry mapping the peer ID to its name (loaded from the configuration at startup) in a static variable with an RwLock. We should instead keep this hashmap inside the P2P struct, for simplicity. This reduces global state and would also allow us to more easily add node names to logs (instead of the opaque peer IDs).

After doing this, we can replicate it in other modules, for example, to map from validator ID to node name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions