Skip to content

Commit

Permalink
fix proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Aug 5, 2024
1 parent 42183bf commit 8d2019e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/merkle/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import path from "path";
import { isMainThread, parentPort, Worker, workerData } from "worker_threads";
import { MerkleTree } from "./merkle";
import { getTonBagDetails } from "./tonsutils";
import {configs} from "../config";

type WD =
| {
Expand Down Expand Up @@ -84,7 +83,7 @@ if (isMainThread) {
const mt = new MerkleTree();
await mt.genTree(fc);
if (wd.type == "getProofs") {
const dap = await mt.getDataAndProofs(fc, Math.floor(wd.random / fc.size));
const dap = await mt.getDataAndProofs(fc, Math.floor(wd.random / mt.opt.chunkSize));
parentPort.postMessage(dap);
} else if (wd.type == "getMerkleRoot") {
parentPort.postMessage(mt.tree[0]);
Expand Down

0 comments on commit 8d2019e

Please sign in to comment.