From 38d27f89b0af9509003258c34334dc7646922968 Mon Sep 17 00:00:00 2001 From: David Dias Date: Sat, 30 Apr 2016 22:18:24 +0200 Subject: [PATCH] rever last commit --- src/block-service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/block-service.js b/src/block-service.js index ed971b6..d3de445 100644 --- a/src/block-service.js +++ b/src/block-service.js @@ -6,7 +6,7 @@ const async = require('async') // datastore and may retrieve data from a remote Exchange. // It uses an internal `datastore.Datastore` instance to store values. function BlockService (ipfsRepo, exchange) { - this.addBlock = ipfsRepo.datastore.put + this.addBlock = ipfsRepo.datastore.put.bind(ipfsRepo.datastore) this.addBlocks = (blocks, callback) => { if (!Array.isArray(blocks)) { @@ -18,7 +18,7 @@ function BlockService (ipfsRepo, exchange) { }, callback) } - this.getBlock = ipfsRepo.datastore.get + this.getBlock = ipfsRepo.datastore.get.bind(ipfsRepo.datastore) this.getBlocks = (multihashes, extension, callback) => { if (typeof extension === 'function') { @@ -45,7 +45,7 @@ function BlockService (ipfsRepo, exchange) { }) } - this.deleteBlock = ipfsRepo.datastore.delete + this.deleteBlock = ipfsRepo.datastore.delete.bind(ipfsRepo.datastore) this.deleteBlocks = (multihashes, extension, callback) => { if (typeof extension === 'function') {