mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-21 06:16:38 +00:00
Merge pull request #257 from orbitdb/feat/ipfs-0.27.0
Use js-ipfs@0.27.0
This commit is contained in:
commit
bc9bded445
2
dist/es5/OrbitDB.js
vendored
2
dist/es5/OrbitDB.js
vendored
@ -229,7 +229,7 @@ var OrbitDB = function () {
|
|||||||
var heads = store._oplog.heads;
|
var heads = store._oplog.heads;
|
||||||
if (heads.length > 0) {
|
if (heads.length > 0) {
|
||||||
logger.debug('Send latest heads of \'' + address + '\':\n', (0, _stringify2.default)(heads, null, 2));
|
logger.debug('Send latest heads of \'' + address + '\':\n', (0, _stringify2.default)(heads, null, 2));
|
||||||
room.sendTo(peer, new Buffer((0, _stringify2.default)(heads)));
|
room.sendTo(peer, (0, _stringify2.default)(heads));
|
||||||
}
|
}
|
||||||
store.events.emit('peer', peer);
|
store.events.emit('peer', peer);
|
||||||
}
|
}
|
||||||
|
2
dist/orbitdb.min.js
vendored
2
dist/orbitdb.min.js
vendored
File diff suppressed because one or more lines are too long
1517
package-lock.json
generated
1517
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@
|
|||||||
"orbit-db-feedstore": "~1.0.0",
|
"orbit-db-feedstore": "~1.0.0",
|
||||||
"orbit-db-keystore": "~0.0.2",
|
"orbit-db-keystore": "~0.0.2",
|
||||||
"orbit-db-kvstore": "~1.0.0",
|
"orbit-db-kvstore": "~1.0.0",
|
||||||
"orbit-db-pubsub": "~0.3.3"
|
"orbit-db-pubsub": "~0.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
@ -34,7 +34,7 @@
|
|||||||
"babel-polyfill": "^6.26.0",
|
"babel-polyfill": "^6.26.0",
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"datastore-level": "~0.7.0",
|
"datastore-level": "~0.7.0",
|
||||||
"ipfs": "~0.26.0",
|
"ipfs": "~0.27.0",
|
||||||
"ipfs-repo": "~0.18.0",
|
"ipfs-repo": "~0.18.0",
|
||||||
"mocha": "^4.0.1",
|
"mocha": "^4.0.1",
|
||||||
"p-each-series": "^1.0.0",
|
"p-each-series": "^1.0.0",
|
||||||
|
@ -145,7 +145,7 @@ class OrbitDB {
|
|||||||
let heads = store._oplog.heads
|
let heads = store._oplog.heads
|
||||||
if (heads.length > 0) {
|
if (heads.length > 0) {
|
||||||
logger.debug(`Send latest heads of '${address}':\n`, JSON.stringify(heads, null, 2))
|
logger.debug(`Send latest heads of '${address}':\n`, JSON.stringify(heads, null, 2))
|
||||||
room.sendTo(peer, new Buffer(JSON.stringify(heads)))
|
room.sendTo(peer, JSON.stringify(heads))
|
||||||
}
|
}
|
||||||
store.events.emit('peer', peer)
|
store.events.emit('peer', peer)
|
||||||
}
|
}
|
||||||
|
@ -130,15 +130,18 @@ describe('orbit-db - Automatic Replication', function() {
|
|||||||
|
|
||||||
// Can't check this for now as db1 might've sent the heads to db2
|
// Can't check this for now as db1 might've sent the heads to db2
|
||||||
// before we subscribe to the event
|
// before we subscribe to the event
|
||||||
// db2.events.on('replicate.progress', (address, hash, entry) => {
|
db2.events.on('replicate.progress', (address, hash, entry) => {
|
||||||
// try {
|
try {
|
||||||
// // Check that the head we received from the first peer is the latest
|
// Check that the head we received from the first peer is the latest
|
||||||
// assert.equal(entry.payload.value, 'hello' + (entryCount - 1))
|
// console.log(JSON.stringify(entry))
|
||||||
// assert.equal(entry.clock.time, entryCount)
|
assert.equal(entry.payload.op, 'ADD')
|
||||||
// } catch (e) {
|
assert.equal(entry.payload.key, null)
|
||||||
// reject(e)
|
assert.notEqual(entry.payload.value.indexOf('hello'), -1)
|
||||||
// }
|
assert.notEqual(entry.clock, null)
|
||||||
// })
|
} catch (e) {
|
||||||
|
reject(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
db2.events.on('replicated', (address) => {
|
db2.events.on('replicated', (address) => {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user