Commit b781911 Julien Bouquillon
authored
1 parent 3fa1fa3 commit b781911 Copy full SHA for b781911
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ const Protector = require('libp2p/src/pnet')
8
8
9
9
/**
10
10
* privateLibp2pNode returns a libp2p node function that will use the swarm
11
- * key at the given `swarmKeyPath ` to create the Protector
11
+ * key with the given `swarmKey ` to create the Protector
12
12
*
13
13
* @param {Buffer } swarmKey
14
14
* @returns {Promise<libp2p> } Returns a libp2pNode function for use in IPFS creation
15
15
*/
16
- const privateLibp2pNode = async ( swarmKeyPath ) => {
16
+ const privateLibp2pNode = async ( swarmKey ) => {
17
17
const node = await Libp2p . create ( {
18
18
modules : {
19
19
transport : [ TCP ] , // We're only using the TCP transport for this example
@@ -25,7 +25,7 @@ const privateLibp2pNode = async (swarmKeyPath) => {
25
25
// being left in for explicit readability.
26
26
// We should explicitly dial pnet peers, or use a custom discovery service for finding nodes in our pnet
27
27
peerDiscovery : [ ] ,
28
- connProtector : new Protector ( swarmKeyPath )
28
+ connProtector : new Protector ( swarmKey )
29
29
}
30
30
} )
31
31
You can’t perform that action at this time.
0 commit comments