From 15a3e08967f6c15d18787cd00c888eb7a9d334d3 Mon Sep 17 00:00:00 2001 From: Krystian Fras Date: Thu, 9 Jan 2025 19:01:02 +0100 Subject: [PATCH] remove unused --- .../web-worker/command-handlers/host-call.ts | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/packages/web-worker/command-handlers/host-call.ts b/src/packages/web-worker/command-handlers/host-call.ts index cd1ef90..4f1e2fc 100644 --- a/src/packages/web-worker/command-handlers/host-call.ts +++ b/src/packages/web-worker/command-handlers/host-call.ts @@ -5,7 +5,7 @@ import { WriteAccounts } from "@/packages/host-calls/write"; import { isInternalPvm } from "../utils"; import { ReadAccounts } from "@/packages/host-calls/read"; import { tryAsServiceId } from "@typeberry/block"; -import { Memory, MemoryIndex, SbrkIndex, tryAsGas } from "@typeberry/pvm-debugger-adapter"; +import { MemoryIndex, tryAsGas } from "@typeberry/pvm-debugger-adapter"; type HostCallParams = { pvm: PvmApiInterface | null; @@ -96,25 +96,6 @@ const getMemory = (pvm: PvmApiInterface) => { pvm.setMemory(address, bytes); return null; }, - - // [KrFr] The following functions are not used in the read and write host call handlers. Can be mocked for now. - /* eslint-disable @typescript-eslint/no-unused-vars */ - fromInitialMemory: () => { - return new Memory(); // Returns the mock itself for simplicity - }, - reset: () => {}, - copyFrom: (_memory: Memory) => {}, - sbrk: (_length: number) => { - return 0 as SbrkIndex; // Simulates returning the current sbrk index - }, - getPageDump: (_pageNumber: number) => { - return null; // Simulates no page dump available - }, - getDirtyPages: function* () { - // Simulates an empty iterator - yield* []; - }, - /* eslint-enable @typescript-eslint/no-unused-vars */ }; };