mirror of https://codeberg.org/pzp/pzp-sync.git
tiny refactor
This commit is contained in:
parent
80168f77cc
commit
4051ba00e2
|
@ -31,9 +31,8 @@ class Algorithm {
|
||||||
let minDepth = Number.MAX_SAFE_INTEGER
|
let minDepth = Number.MAX_SAFE_INTEGER
|
||||||
let maxDepth = 0
|
let maxDepth = 0
|
||||||
for (const rec of this.#peer.db.records()) {
|
for (const rec of this.#peer.db.records()) {
|
||||||
if (!rec.msg) continue
|
if (!rec.msg?.content) continue
|
||||||
const tangles = rec.msg.metadata.tangles
|
const tangles = rec.msg.metadata.tangles
|
||||||
if (!rec.msg.content) continue
|
|
||||||
if (rec.hash === rootMsgHash) {
|
if (rec.hash === rootMsgHash) {
|
||||||
minDepth = 0
|
minDepth = 0
|
||||||
} else if (tangles[rootMsgHash]) {
|
} else if (tangles[rootMsgHash]) {
|
||||||
|
|
Loading…
Reference in New Issue