Ordering tests

This commit is contained in:
haad 2016-02-29 13:24:18 +01:00
parent f3b49b2a40
commit 5e86dca03f
2 changed files with 5 additions and 4 deletions

View File

@ -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 = [];
}

View File

@ -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() {