mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-25 10:32:14 +00:00
complete
This commit is contained in:
parent
4036ea4b1a
commit
b83e5dd8dc
@ -33,9 +33,9 @@
|
||||
"chai": "^3.5.0",
|
||||
"istanbul": "^0.4.2",
|
||||
"libp2p-spdy": "^0.2.3",
|
||||
"libp2p-tcp": "^0.3.0",
|
||||
"libp2p-tcp": "^0.4.0",
|
||||
"mocha": "^2.4.5",
|
||||
"multiaddr": "^1.1.1",
|
||||
"multiaddr": "^1.3.0",
|
||||
"peer-id": "^0.6.0",
|
||||
"peer-info": "^0.6.0",
|
||||
"pre-commit": "^1.1.2",
|
||||
|
@ -41,7 +41,8 @@ function Swarm (peerInfo) {
|
||||
multiaddrs = [multiaddrs]
|
||||
}
|
||||
|
||||
// TODO a) filter the multiaddrs that are actually valid for this transport (use a func from the transport itself) (maybe even make the transport do that)
|
||||
// a) filter the multiaddrs that are actually valid for this transport (use a func from the transport itself) (maybe even make the transport do that)
|
||||
multiaddrs = t.filter(multiaddrs)
|
||||
|
||||
// b) if multiaddrs.length = 1, return the conn from the
|
||||
// transport, otherwise, create a passthrough
|
||||
|
@ -77,6 +77,7 @@ describe('transport - tcp', function () {
|
||||
|
||||
it('dial to set of multiaddr, only one is available', (done) => {
|
||||
const conn = swarmA.transport.dial('tcp', [
|
||||
multiaddr('/ip4/127.0.0.1/tcp/9910/websockets'), // not valid on purpose
|
||||
multiaddr('/ip4/127.0.0.1/tcp/9910'),
|
||||
multiaddr('/ip4/127.0.0.1/tcp/9999'),
|
||||
multiaddr('/ip4/127.0.0.1/tcp/9309')
|
||||
|
Loading…
x
Reference in New Issue
Block a user