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 startup2019-08-13 08:09:37 +00:00
connect already returns a promise. why the need for the wrapper function?
debug(`Connecting to known IPFS node`);awaitipfsApi.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');
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
Connect to Kosmos IPFS node on startto Connect to Kosmos IPFS node on startupThis works perfectly, nice
connectalready returns a promise. why the need for the wrapper function?👍
I followed the API docs, and they say something different. Did you test this?
yes,
we also use it in the kredits-contracts ipfs class
Damn docs. Thanks. :(