diff --git a/test/feed-sync.test.js b/test/feed-sync.test.js index 6b18a09..5247fe2 100644 --- a/test/feed-sync.test.js +++ b/test/feed-sync.test.js @@ -64,7 +64,7 @@ test('sync a feed with goal=all', async (t) => { } t.pass('alice has msgs 1..10 from carol') - const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post') + const carolPostsRootHash = alice.db.feed.getId(carolId, 'post') const carolPostsRootMsg = alice.db.get(carolPostsRootHash) await p(bob.db.add)(carolPostsRootMsg, carolPostsRootHash) @@ -155,7 +155,7 @@ test('sync a feed with goal=newest', async (t) => { } t.pass('alice has msgs 1..10 from carol') - const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post') + const carolPostsRootHash = alice.db.feed.getId(carolId, 'post') const carolPostsRootMsg = alice.db.get(carolPostsRootHash) await p(bob.db.add)(carolPostsRootMsg, carolPostsRootHash) @@ -245,7 +245,7 @@ test('sync a feed with goal=newest but too far behind', async (t) => { carolMsgs.push(rec.msg) } - const carolPostsRootHash = alice.db.feed.getRoot(carolId, 'post') + const carolPostsRootHash = alice.db.feed.getId(carolId, 'post') const carolPostsRootMsg = alice.db.get(carolPostsRootHash) const algo = new Algorithm(alice) diff --git a/test/thread-sync.test.js b/test/thread-sync.test.js index 3e26a6a..503b8b8 100644 --- a/test/thread-sync.test.js +++ b/test/thread-sync.test.js @@ -114,7 +114,7 @@ test('sync a thread where both peers have portions', async (t) => { data: { text: 'A' }, keys: aliceKeys, }) - const rootHashA = alice.db.feed.getRoot(aliceId, 'post') + const rootHashA = alice.db.feed.getId(aliceId, 'post') const rootMsgA = alice.db.get(rootHashA) await p(bob.db.add)(rootMsgA, rootHashA) @@ -135,7 +135,7 @@ test('sync a thread where both peers have portions', async (t) => { tangles: [startA.hash], keys: bobKeys, }) - const rootHashB = bob.db.feed.getRoot(bobId, 'post') + const rootHashB = bob.db.feed.getId(bobId, 'post') const rootMsgB = bob.db.get(rootHashB) await p(alice.db.add)(rootMsgB, rootHashB)