From 864f6694bd16dbb46add9caace2b1d4c7734d4a0 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 7 Dec 2017 16:18:06 +1300 Subject: [PATCH 1/2] fix: keys is a standard interface-datastore copy and paste error --- src/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 1ffbc055..d362ba8c 100644 --- a/src/index.js +++ b/src/index.js @@ -106,14 +106,7 @@ class IpfsRepo { }, (cb) => { log('creating keystore') - const keysBaseStore = backends.create('keys', path.join(this.path, 'keys'), this.options) - blockstore( - keysBaseStore, - this.options.storageBackendOptions.keys, - cb) - }, - (keys, cb) => { - this.keys = keys + this.keys = backends.create('keys', path.join(this.path, 'keys'), this.options) cb() }, From 9df46b9233e944aa96176019c86b1fb12e893ac4 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 8 Dec 2017 12:05:23 +1300 Subject: [PATCH 2/2] test: keystore is a interface-datastore --- test/keystore-test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/keystore-test.js b/test/keystore-test.js index a04e1695..0c3469c6 100644 --- a/test/keystore-test.js +++ b/test/keystore-test.js @@ -11,5 +11,10 @@ module.exports = (repo) => { it('exists', () => { expect(repo).to.have.property('keys') }) + it('implements interface-datastore', () => { + const keys = repo.keys + expect(keys.batch).to.exist() + expect(keys.query).to.exist() + }) }) }