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

Refactor Logic around DataFromPeer #196

Open
ceilican opened this issue Mar 2, 2018 · 0 comments
Open

Refactor Logic around DataFromPeer #196

ceilican opened this issue Mar 2, 2018 · 0 comments

Comments

@ceilican
Copy link
Contributor

ceilican commented Mar 2, 2018

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...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant