Skip to content

Commit 8d2a954

Browse files
committed
Fix.
1 parent 18de45c commit 8d2a954

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

yarn-project/simulator/src/public/hints_builder.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class HintsBuilder {
4242
readRequests,
4343
MAX_NOTE_HASH_READ_REQUESTS_PER_TX,
4444
NOTE_HASH_TREE_HEIGHT,
45+
MerkleTreeId.NOTE_HASH_TREE,
4546
);
4647
}
4748

@@ -74,6 +75,7 @@ export class HintsBuilder {
7475
readRequests,
7576
MAX_L1_TO_L2_MSG_READ_REQUESTS_PER_TX,
7677
L1_TO_L2_MSG_TREE_HEIGHT,
78+
MerkleTreeId.L1_TO_L2_MESSAGE_TREE,
7779
);
7880
}
7981

@@ -161,17 +163,15 @@ export class HintsBuilder {
161163
private async getTreeLeafReadRequestsHints<N extends number, TREE_HEIGHT extends number>(
162164
readRequests: Tuple<TreeLeafReadRequest, N>,
163165
size: N,
164-
height: TREE_HEIGHT,
166+
treeHeight: TREE_HEIGHT,
167+
treeId: MerkleTreeId,
165168
): Promise<Tuple<TreeLeafReadRequestHint<TREE_HEIGHT>, N>> {
166-
const hints = makeTuple(size, () => TreeLeafReadRequestHint.empty(height));
169+
const hints = makeTuple(size, () => TreeLeafReadRequestHint.empty(treeHeight));
167170
for (let i = 0; i < readRequests.length; i++) {
168171
const request = readRequests[i];
169172
if (!request.isEmpty()) {
170-
const siblingPath = await this.db.getSiblingPath<typeof height>(
171-
MerkleTreeId.NOTE_HASH_TREE,
172-
request.leafIndex.toBigInt(),
173-
);
174-
hints[i] = new TreeLeafReadRequestHint(height, siblingPath.toTuple());
173+
const siblingPath = await this.db.getSiblingPath<typeof treeHeight>(treeId, request.leafIndex.toBigInt());
174+
hints[i] = new TreeLeafReadRequestHint(treeHeight, siblingPath.toTuple());
175175
}
176176
}
177177
return hints;

0 commit comments

Comments
 (0)