Skip to content

Commit d99f3c4

Browse files
richardschneiderdaviddias
authored andcommitted
fix: keys is a standard interface-datastore (#156)
* fix: keys is a standard interface-datastore copy and paste error * test: keystore is a interface-datastore
1 parent a55b937 commit d99f3c4

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/index.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ class IpfsRepo {
106106
},
107107
(cb) => {
108108
log('creating keystore')
109-
const keysBaseStore = backends.create('keys', path.join(this.path, 'keys'), this.options)
110-
blockstore(
111-
keysBaseStore,
112-
this.options.storageBackendOptions.keys,
113-
cb)
114-
},
115-
(keys, cb) => {
116-
this.keys = keys
109+
this.keys = backends.create('keys', path.join(this.path, 'keys'), this.options)
117110
cb()
118111
},
119112

test/keystore-test.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@ module.exports = (repo) => {
1111
it('exists', () => {
1212
expect(repo).to.have.property('keys')
1313
})
14+
it('implements interface-datastore', () => {
15+
const keys = repo.keys
16+
expect(keys.batch).to.exist()
17+
expect(keys.query).to.exist()
18+
})
1419
})
1520
}

0 commit comments

Comments
 (0)