Add IPFS connection check
This commit is contained in:
parent
28eba3452c
commit
4fb03c5677
2
index.js
2
index.js
|
@ -32,6 +32,7 @@ console.log(`Using IPFS:`, ipfsConfig);
|
|||
{ network: argv.network, rpcUrl: argv.rpcUrl },
|
||||
{ apm: argv.apm, ipfsConfig: ipfsConfig, addresses: { Kernel: argv.daoAddress } }
|
||||
).init();
|
||||
await kredits.ipfs._ipfsAPI.id(); // check the connection to the IPFS client TODO: redesign IPFS wrapper API and not use an internal attribute
|
||||
const ipfsPinner = new IpfsPinner(kredits);
|
||||
|
||||
ipfsPinner.pinAll().then(pins => {
|
||||
|
@ -42,6 +43,7 @@ console.log(`Using IPFS:`, ipfsConfig);
|
|||
});
|
||||
console.log(`Subscribed to DAO: ${kredits.Kernel.contract.address}`);
|
||||
} catch(e) {
|
||||
console.log('Failed to start pinner');
|
||||
console.log(e);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue