Ordering tests
This commit is contained in:
parent
f3b49b2a40
commit
5e86dca03f
@ -32,7 +32,8 @@ class List {
|
||||
this.ver = 0;
|
||||
const current = _.differenceWith(this._currentBatch, this._items, Node.equals);
|
||||
const others = _.differenceWith(other.items, this._items, Node.equals);
|
||||
const final = _.unionWith(others, current, Node.equals);
|
||||
const final = _.unionWith(current, others, Node.equals);
|
||||
// const final = _.unionWith(others, current, Node.equals);
|
||||
this._items = this._items.concat(final);
|
||||
this._currentBatch = [];
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ class OrbitList extends List {
|
||||
}
|
||||
|
||||
join(other) {
|
||||
super.join(other);
|
||||
|
||||
// WIP: fetch missing nodes
|
||||
let depth = 0;
|
||||
@ -50,9 +51,8 @@ class OrbitList extends List {
|
||||
}
|
||||
};
|
||||
|
||||
other.items.forEach((e) => e.heads.forEach(fetchRecursive));
|
||||
console.log("--> Fetched", MaxHistory, "items from the history\n");
|
||||
super.join(other);
|
||||
// other.items.forEach((e) => e.heads.forEach(fetchRecursive));
|
||||
// console.log("--> Fetched", MaxHistory, "items from the history\n");
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user