From fd2bb0829d78fbfa14e17e99adc8898958a2e50c Mon Sep 17 00:00:00 2001 From: Joel Torstensson Date: Tue, 23 Jun 2020 10:45:41 +0200 Subject: [PATCH] more edits --- tools/sync-rootstore.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/sync-rootstore.js b/tools/sync-rootstore.js index bd009b7a..f7565479 100755 --- a/tools/sync-rootstore.js +++ b/tools/sync-rootstore.js @@ -9,11 +9,16 @@ const start = async (address) => { const opts = { orbitPath: './tmp/orbitdb/' } const replicator = await Replicator.create(ipfs, opts) console.log('starting') - await replicator.start(address) + await replicator.start(address, null)//, { spacesList: ['clients'] }) console.log('syncing') await replicator.rootstoreSyncDone console.log('rootstore synced') - console.log(replicator.rootstore._oplog.length) + console.log(replicator.rootstore.all.map(e => { + return e.payload.value + })) + //const store = await replicator._loadKeyValueStore('/orbitdb/QmXxg79y5akxNBB4WsY5oPS82PCxiU9WQbR1aK9aD7ieiH/3box.space.clients.keyvalue') + //console.log('store:') + //console.log(store._oplog.length) await replicator.syncDone console.log('all syned') }