Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian50 committed Jan 9, 2025
1 parent 4aa914d commit 15a3e08
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/packages/web-worker/command-handlers/host-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
};
};

Expand Down

0 comments on commit 15a3e08

Please sign in to comment.