mintlayer-core icon indicating copy to clipboard operation
mintlayer-core copied to clipboard

Get rid of confusing naming in p2p

Open TheQuantumPhysicist opened this issue 2 years ago • 0 comments

(Created on Aug 25, 2023 by @ImplOfAnImpl)

  • [ ] The module name default_backend suggests that the module can be replaced with some other "non-default" implementation, but this is not true, because its current implementation basically defines the protocol. So it's more like the_backend. On the other hand, there is no obvious good name for it right now; e.g. naming it simply "backend" is not very good because it has a submodule called backend as well as the Backend struct, so this will lead to extra confusion.

  • [ ] MessagingService is too generic a name for a trait that can only send SyncMessages. Additionally, the generic parameters that must implement MessagingService are usually named MessagingHandle, which is also too generic and makes it hard to understand what exactly they are for. (but note that implementations of MessagingService are also called MessagingHandles, and they should probably be named differently than the aforementioned generic parameters).

TheQuantumPhysicist avatar Sep 18 '23 14:09 TheQuantumPhysicist