Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Refactor Logic around DataFromPeer #196

Open
@ceilican

Description

Right now the message DataFromPeer is received by two actors: PeerSynchronizer and NodeViewSynchronizer. And it is sent by NetworkController, which has a sophisticated and generic message handling mechanism to decide if it should send a DataFromPeer message to PeerSynchronizer or to NodeViewSynchronizer.

The question is: do we need all this generality? I think it is compromising clarity and making the code that handles these messages in PeerSynchronizer and NodeViewSynchronixer more complex than it needs to be. Maybe there is a simpler to accomplish the same thing, although I don't have a clear idea how at the moment.

Maybe a first step could be to specialize DataFromPeer into more specific message classes, such as ModifiersFromPeer, InvDataFromPeer, SyncInfoFromPeer, PeersFromPeer, and so on...

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