mirror of https://codeberg.org/pzp/pzp-sync.git
Don't throw on missing local want range
This commit is contained in:
parent
a517fd465c
commit
8f2bd08a60
|
@ -208,8 +208,7 @@ class SyncStream extends Pipeable {
|
|||
this.#remoteHave.set(id, remoteHaveRange)
|
||||
this.#remoteWant.set(id, remoteWantRange)
|
||||
const goal = this.#goals.get(id)
|
||||
const haveRange = this.#localHave.get(id)
|
||||
if (!haveRange) throw new Error(`Local have-range not set for ${id}`)
|
||||
const haveRange = this.#localHave.get(id) ?? [-1, -1]
|
||||
const localWant = await this.#algo.wantRange(haveRange, remoteHaveRange, goal)
|
||||
this.#localWant.set(id, localWant)
|
||||
const localBloom0 = await this.#algo.bloomFor(id, 0, localWant)
|
||||
|
|
Loading…
Reference in New Issue