diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:26:45 -0500 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:26:45 -0500 |
| commit | ecc31787c2174a829848aac403bd13e663fe33c3 (patch) | |
| tree | 7f505dc9bfe9c34c36c5043911be0cfc0d146a8d /impls/monero.ts/checksum.ts | |
| parent | 24076c5a32bbec3c77cc996cb74dd08d8077a7e0 (diff) | |
| parent | 40c1a1bda4b6f125c702f5a37ecc48a6ebec24b8 (diff) | |
Merge branch 'develop' into zano
Diffstat (limited to 'impls/monero.ts/checksum.ts')
| -rw-r--r-- | impls/monero.ts/checksum.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/impls/monero.ts/checksum.ts b/impls/monero.ts/checksum.ts index b0d12b0..81140d3 100644 --- a/impls/monero.ts/checksum.ts +++ b/impls/monero.ts/checksum.ts @@ -1,6 +1,6 @@ import { moneroChecksum } from "./checksum_monero.ts"; -import { getSymbol, readCString } from "./src/utils.ts"; -import { dylib, loadMoneroDylib } from "./src/bindings.ts"; +import { readCString } from "./src/utils.ts"; +import { fns, loadMoneroDylib } from "./src/bindings.ts"; loadMoneroDylib(); @@ -21,7 +21,7 @@ export class ChecksumError extends Error { * @returns {ChecksumError} which contains information about why checksum failed */ export async function validateChecksum(): Promise<ChecksumError | null> { - const cppHeaderHash = await readCString(await getSymbol("checksum_wallet2_api_c_h")!(), false); + const cppHeaderHash = await readCString(await fns.checksum_wallet2_api_c_h!(), false); const tsHeaderHash = moneroChecksum.wallet2_api_c_h_sha256; const errors: string[] = []; @@ -32,14 +32,14 @@ export async function validateChecksum(): Promise<ChecksumError | null> { errorCode++; } - const cppSourceHash = await readCString(await getSymbol("checksum_wallet2_api_c_cpp")!(), false); + const cppSourceHash = await readCString(await fns.checksum_wallet2_api_c_cpp!(), false); const tsSourceHash = moneroChecksum.wallet2_api_c_cpp_sha256; if (cppSourceHash !== tsSourceHash) { errors.push(`ERR: CPP source file check mismatch ${cppSourceHash} == ${tsSourceHash}`); errorCode++; } - const cppExportHash = await readCString(await getSymbol("checksum_wallet2_api_c_exp")!(), false); + const cppExportHash = await readCString(await fns.checksum_wallet2_api_c_exp!(), false); const tsExportHash = moneroChecksum.wallet2_api_c_exp_sha256; if (cppExportHash !== tsExportHash) { if (Deno.build.os !== "darwin") { |
