mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-13 17:46:36 +00:00
Cleanups
This commit is contained in:
parent
e687b51d96
commit
b1d16fc7b4
@ -22,6 +22,7 @@ const addDatabaseType = (type, store) => {
|
|||||||
databaseTypes[type] = store
|
databaseTypes[type] = store
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DefaultDatabaseType = 'events'
|
||||||
const DefaultAccessController = IPFSAccessController
|
const DefaultAccessController = IPFSAccessController
|
||||||
|
|
||||||
const OrbitDB = async ({ ipfs, id, identity, keystore, directory } = {}) => {
|
const OrbitDB = async ({ ipfs, id, identity, keystore, directory } = {}) => {
|
||||||
@ -64,7 +65,7 @@ const OrbitDB = async ({ ipfs, id, identity, keystore, directory } = {}) => {
|
|||||||
meta = manifest.meta
|
meta = manifest.meta
|
||||||
} else {
|
} else {
|
||||||
// If the address given was not valid, eg. just the name of the database
|
// If the address given was not valid, eg. just the name of the database
|
||||||
type = type || 'events'
|
type = type || DefaultDatabaseType
|
||||||
AccessController = AccessController || DefaultAccessController()
|
AccessController = AccessController || DefaultAccessController()
|
||||||
accessController = await AccessController({ orbitdb: { open, identity, ipfs }, identities })
|
accessController = await AccessController({ orbitdb: { open, identity, ipfs }, identities })
|
||||||
const m = await manifests.create({ name: address, type, accessController: accessController.address, meta })
|
const m = await manifests.create({ name: address, type, accessController: accessController.address, meta })
|
||||||
|
@ -65,7 +65,7 @@ describe('Identities', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe.skip('Passing in custom keystore', async () => {
|
describe('Passing in custom keystore', async () => {
|
||||||
const id = 'userB'
|
const id = 'userB'
|
||||||
|
|
||||||
let identity
|
let identity
|
||||||
|
@ -7,7 +7,7 @@ import connectPeers from './utils/connect-nodes.js'
|
|||||||
import waitFor from './utils/wait-for.js'
|
import waitFor from './utils/wait-for.js'
|
||||||
|
|
||||||
describe('Replicating databases', function () {
|
describe('Replicating databases', function () {
|
||||||
this.timeout(60000)
|
this.timeout(30000)
|
||||||
|
|
||||||
let ipfs1, ipfs2
|
let ipfs1, ipfs2
|
||||||
let orbitdb1, orbitdb2
|
let orbitdb1, orbitdb2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user