Skip to content

Commit 2b0b39c

Browse files
committed
include cache information in get method
1 parent d1fdd8c commit 2b0b39c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/provable/dynamic-array.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ class DynamicArrayBase<ProvableValue = any, Value = any> {
176176

177177
/**
178178
* Gets value at index i, and proves that the index is in the array.
179+
* It uses an internal cache to avoid duplication of constraints when the
180+
* same index is used multiple times.
179181
*/
180182
get(i: Field): ProvableValue {
181183
this.assertIndexInRange(i);

0 commit comments

Comments
 (0)