-
Notifications
You must be signed in to change notification settings - Fork 48
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 #4
network #4
Conversation
// connected. Once we have Peer Routing, we will be able | ||
// to find the Peer | ||
if (this.libp2p.swarm.muxedConns[peerId.toB58String()]) { | ||
// TODO: ask - want _onPeerConnected to be called here too? |
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.
@dignifiedquire should I call _onPeerConnected here too? Or is the cb
enough to signal we successfully dialed (I'm afraid that we fire to routines for connecting to the same peer)
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.
I need to check
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.
No need to call _onPeerConnected
here, as that will already have been called from the first connection in this case.
@diasdavid can you rebase please? |
@dignifiedquire rebased, but do not merge yet :) |
d08ced8
to
bc00898
Compare
@dignifiedquire the network is implemented :) |
it('block is retrived from peer', (done) => { | ||
// Not sure if I understand what is going on here | ||
// test fails because now the network is not properly mocked | ||
// what are these net.stores and mockNet.bitswaps? |
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.
@dignifiedquire could you clarify what is going on in this test? libp2p needs to be properly mocked, but I couldn't get what was exactly was going on/intended.
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.
Yes, I need to change the mock network tool to now mock libp2p instead of the network instance
fix(network): better message handling
This is a WIP, missing:
peer-mux-*
eventssendMessage
call_receiveMessage