Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
feat: accept additional transports
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 authored and daviddias committed Oct 18, 2017
1 parent f8dbe52 commit 6613aa6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/runtime/libp2p-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class Node extends libp2p {
modules.discovery.push(r)
}

if (options.modules && options.modules.transport) {
options.modules.transport.forEach((t) => modules.transport.push(t))
}

if (options.modules && options.modules.discovery) {
options.modules.discovery.forEach((d) => modules.discovery.push(d))
}

super(modules, peerInfo, peerBook, options)
}
}
Expand Down

0 comments on commit 6613aa6

Please sign in to comment.