update to msg-v4

This commit is contained in:
Andre Staltz 2023-12-25 12:35:36 +02:00
parent 6606b5a758
commit bcdc979729
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
const makeDebug = require('debug')
const MsgV3 = require('ppppp-db/msg-v3')
const MsgV4 = require('ppppp-db/msg-v4')
/**
* @typedef {ReturnType<import('ppppp-db').init>} PPPPPDB
@ -89,7 +89,7 @@ function initConductor(peer, config) {
/**
* How many bytes does a single msg ID take up
*/
const MSG_ID_BYTES = MsgV3.getMootID('dummy', 'dummy').length
const MSG_ID_BYTES = MsgV4.getMootID('dummy', 'dummy').length
/**
* How many bytes does an average msg take up

View File

@ -388,8 +388,8 @@ test('Set and Dict ghost spans', async (t) => {
alice.conductor.start(aliceID, [['post@all'], ['post@all']], 4_000)
bob.conductor.start(bobID, [['post@all'], ['post@all']], 4_000)
assert.equal(alice.set.getGhostSpan(), 11916, 'alice set ghost span is 2')
assert.equal(alice.dict.getGhostSpan(), 11916, 'alice set ghost span is 2')
assert.equal(alice.set.getGhostSpan(), 5958, 'alice set ghost span is 2')
assert.equal(alice.dict.getGhostSpan(), 5958, 'alice set ghost span is 2')
await p(alice.close)(true)
await p(bob.close)(true)