From 338cdd7bc3d7ae6ca8ffbdd8f79f817c77287620 Mon Sep 17 00:00:00 2001 From: Samika Kashyap Date: Wed, 3 Apr 2024 10:45:25 -0700 Subject: [PATCH] fix: enable offline mode when fetching blocks while anchoring --- packages/core/src/dispatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/dispatcher.ts b/packages/core/src/dispatcher.ts index c97a2fc057..1c196eb3c4 100644 --- a/packages/core/src/dispatcher.ts +++ b/packages/core/src/dispatcher.ts @@ -207,7 +207,7 @@ export class Dispatcher { Metrics.count(IPFS_CACHE_MISS, 1) const bytes = await this._shutdownSignal.abortable((signal) => { // @ts-expect-error - return this._ipfs.block.get(cid, { signal, offline: !this.enableSync }) + return this._ipfs.block.get(cid, { signal, offline: !this.enableSync || this.recon.enabled}) }) this.ipldCache.setBlock(cid, bytes) return new CarBlock(cid, bytes)