mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Ordering tests
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user