From 8895f557e56e12d8716e595cf609f430ade8b484 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 27 Nov 2022 18:12:28 -0500 Subject: [PATCH] *getNodeQuery is not needed, for now --- src/modules/rpc/cache.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/modules/rpc/cache.ts b/src/modules/rpc/cache.ts index 6434f8e..fd770f5 100644 --- a/src/modules/rpc/cache.ts +++ b/src/modules/rpc/cache.ts @@ -40,31 +40,6 @@ export class RPCCache extends EventEmitter { }); } - public async getNodeQuery( - node: string, - queryHash: string - ): Promise { - if (!this.dhtCache?.peerHasItem(node, queryHash)) { - return false; - } - - const rpc = await getRpcByPeer(node); - - let response; - - try { - response = rpc.request("rpc.get_cached_item", queryHash) as RPCCacheItem; - } catch (e: any) { - return false; - } - - if (!this.verifyResponse(b4a.from(node, "hex") as Buffer, response)) { - return false; - } - - return { ...response?.value }; - } - public signResponse(item: RPCCacheItem): string { const field = item.value.signedField || "data"; const updated = item.value.updated;