Connect to Kosmos IPFS node on startup #5

Manually merged
greg merged 1 commits from feature/connect_to_kosmos_ipfs_node into master 2019-08-13 09:02:35 +00:00
Owner

This ensures that the local IPFS node is always connected to a known Kosmos node before attempting to fetch documents. Vastly improves performance.

closes #4

This ensures that the local IPFS node is always connected to a known Kosmos node before attempting to fetch documents. Vastly improves performance. closes #4
raucao changed title from Connect to Kosmos IPFS node on start to Connect to Kosmos IPFS node on startup 2019-08-13 08:09:37 +00:00
Owner

This works perfectly, nice

This works perfectly, nice
greg closed this pull request 2019-08-13 09:02:34 +00:00
raucao deleted branch feature/connect_to_kosmos_ipfs_node 2019-08-13 09:09:21 +00:00
bumi reviewed 2019-08-13 09:34:31 +00:00
Owner

connect already returns a promise. why the need for the wrapper function?

debug(`Connecting to known IPFS node`);
await ipfsApi.swarm.connect('/ip4/46.4.18.160/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7');
`connect` already returns a promise. why the need for the wrapper function? ```js debug(`Connecting to known IPFS node`); await ipfsApi.swarm.connect('/ip4/46.4.18.160/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7'); ```
Owner

👍

:+1:
raucao reviewed 2019-08-13 10:37:28 +00:00
Author
Owner

I followed the API docs, and they say something different. Did you test this?

I followed the API docs, and they say something different. Did you test this?
bumi reviewed 2019-08-13 10:48:00 +00:00
Owner

yes,
we also use it in the kredits-contracts ipfs class

yes, we also use it in the kredits-contracts ipfs class
raucao reviewed 2019-08-13 11:24:35 +00:00
Author
Owner

Damn docs. Thanks. :(

Damn docs. Thanks. :(
raucao added the
feature
label 2023-04-26 14:01:23 +00:00
Sign in to join this conversation.
No description provided.