-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network Adapter Refactoring and Tests #90
Conversation
fix(net:msg) use vendored imports
use a third-party pubsub library for internal communications Insights: * Within bitswap, the actors don't need anything more than simple pubsub behavior. Wrapping and unwrapping messages proves unneccessary. Changes: * Simplifies the interface for both actors calling GetBlock and actors receiving blocks on the network * Leverages a well-tested third-party pubsub library Design Goals: * reduce complexity * extract implementation details (wrapping and unwrapping data, etc) from bitswap and let bitswap focus on composition of core algorithms operations
add interface
+ test that a partners wants are remembered by message receiver
Youre gonna kill me with having your branch name different than the one you are requesting a pull from... |
// NewSender wraps a network Service to perform translation between | ||
// networkAdapter implements NetworkAdapter | ||
type networkAdapter struct { | ||
networkService NetService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this naming is inconsistent with the other changes you are making...
Im confused about your reasoning for the naming changes |
Golint thought that calling a type like Network.networkAdapter is too repetitive, suggested i switch the name so i used net instead of network. |
see: https://github.com/jbenet/go-ipfs/tree/master/exchange/bitswap |
Use multiple cores in logger
fix: go1.9 monotonic time (for real this time)
feat: remove strict signing pubsub option.
…ct-signing-option feat: remove strict signing pubsub option.
…ct-signing-option feat: remove strict signing pubsub option.
…ct-signing-option feat: remove strict signing pubsub option.
There were a few confusing naming conventions specifically with network adapter and network service that i clarified.
There was also some circular logic in the network adapter code that needed more clarification.
The NetAdapter interface now contains the HandleMessage method.
Network Adapter needed tests so I went ahead and implemented some tests. 2 of the tests will fail because they depend on a TODO method from Brian, so they are currently commented out.