From 4fb03c56777dd088828652056f7103ffce181449 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Tue, 2 Jul 2019 17:41:38 +0200 Subject: [PATCH] Add IPFS connection check --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 15cae58..1ac7318 100755 --- a/index.js +++ b/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); }