From 4cfd5367dbf302b421c5ec42458c0ad04759eeb9 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 16 May 2016 23:58:40 +0200 Subject: [PATCH] examples/benchmark --- examples/benchmark.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/benchmark.js b/examples/benchmark.js index fb06e2c..fe2624e 100644 --- a/examples/benchmark.js +++ b/examples/benchmark.js @@ -1,6 +1,7 @@ 'use strict'; -const ipfsd = require('ipfsd-ctl'); +// const ipfsd = require('ipfsd-ctl'); +const IPFS = require('ipfs') const OrbitDB = require('../src/OrbitDB'); const Timer = require('./Timer'); @@ -19,13 +20,17 @@ const startIpfs = () => { // if(err) console.error(err); // resolve(ipfs); // }); - ipfsd.local((err, node) => { - if(err) reject(err); - node.startDaemon((err, ipfs) => { - if(err) reject(err); - resolve(ipfs); - }); - }); + // ipfsd.local((err, node) => { + // if(err) reject(err); + // node.startDaemon((err, ipfs) => { + // if(err) reject(err); + // resolve(ipfs); + // }); + // }); + const ipfs = new IPFS() + ipfs.goOnline(() => { + resolve(ipfs) + }) }); };