mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-19 21:36:37 +00:00
Remove obsolete notes
This commit is contained in:
parent
190c64eb45
commit
1000bde187
@ -69,55 +69,6 @@
|
|||||||
"items": ["<Item>"]
|
"items": ["<Item>"]
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
list.add(data) {
|
|
||||||
this.ver ++;
|
|
||||||
const heads = _findHeads();
|
|
||||||
const i = new Item(id, this.seq, this.ver, heads)
|
|
||||||
outgoing.push(data)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
list.join(other) {
|
|
||||||
// increase seq on join, reset version
|
|
||||||
if(other.first.seq >= this.seq)
|
|
||||||
this.seq = other.first.seq + 1
|
|
||||||
this.ver = 0
|
|
||||||
|
|
||||||
items = items.concat(outgoing.concat(other))
|
|
||||||
items = items.sortBy("seq", "id", "ver")
|
|
||||||
outgoing = []
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
nextHeads() {
|
|
||||||
referenced = []
|
|
||||||
heads = all.groupBy("id").map((items) => items[items.length - 1])
|
|
||||||
cleaned = heads.reverse().filter((e) => !isReferencedInChain(referenced, e))
|
|
||||||
return cleaned;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
isReferencedInChain(list, other) {
|
|
||||||
const res = other.map((o) => {
|
|
||||||
const ref = list.map((e) => !(e.id == o.id && e.seq == o.seq && e.ver == o.ver))
|
|
||||||
if(!ref)
|
|
||||||
list.push(ref)
|
|
||||||
//return false
|
|
||||||
|
|
||||||
//list.concat(list.filter((e) => !(e.id == o.id && e.seq == o.seq && e.ver == o.ver)))
|
|
||||||
if(o.prev)
|
|
||||||
ref = isReferencedInChain(list, o.prev)
|
|
||||||
|
|
||||||
return ref
|
|
||||||
})
|
|
||||||
return res.anyEqual(true)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
A B C
|
A B C
|
||||||
0.0
|
0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user