Moved all the bft_crdt stuff into its own module
This commit is contained in:
6
crates/bft-json-crdt/tests/editing-trace.js
generated
6
crates/bft-json-crdt/tests/editing-trace.js
generated
@@ -259796,7 +259796,7 @@ function insertAt(idx, elt) {
|
||||
const pos = new_log.findIndex(log => log[0] === parent_id)
|
||||
new_log.push([ID_COUNTER, pos, 0, elt])
|
||||
crdt.splice(raw_i + 1, 0, { deleted: false, content: elt, id: ID_COUNTER })
|
||||
// console.log(`insert at ${idx} translated as op [${ID_COUNTER}, ${pos}, ${0}, ${escape(elt)}] found at ${raw_i + 1}::`, crdt[raw_i + 1])
|
||||
// console.log(`insert at ${idx} translated as op [${ID_COUNTER}, ${pos}, ${0}, ${escape(elt)}] found at ${raw_i + 1}::`, bft-crdt[raw_i + 1])
|
||||
return
|
||||
}
|
||||
|
||||
@@ -259816,7 +259816,7 @@ function deleteAt(idx) {
|
||||
const pos = new_log.findIndex(log => log[0] === our_id)
|
||||
new_log.push([ID_COUNTER, pos, 1]);
|
||||
crdt[raw_i].deleted = true
|
||||
// console.log(`delete at ${idx} translated as op [${ID_COUNTER}, ${pos}, ${1}] found at ${raw_i} with our_id ${our_id}::`, crdt[raw_i])
|
||||
// console.log(`delete at ${idx} translated as op [${ID_COUNTER}, ${pos}, ${1}] found at ${raw_i} with our_id ${our_id}::`, bft-crdt[raw_i])
|
||||
return
|
||||
}
|
||||
|
||||
@@ -259853,7 +259853,7 @@ function rawJSString(edits) {
|
||||
// deleteAt(edit[0])
|
||||
// }
|
||||
// }
|
||||
// console.log(crdt)
|
||||
// console.log(bft-crdt)
|
||||
// rawJSString(mock_edits)
|
||||
// console.log(new_log)
|
||||
// const subset = edits.slice(0, 50000)
|
||||
|
||||
Reference in New Issue
Block a user