We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 182377a commit fd39b63Copy full SHA for fd39b63
yarn-project/pxe/src/contract_function_simulator/execution_tagging_index_cache.ts
@@ -13,6 +13,10 @@ export class ExecutionTaggingIndexCache {
13
}
14
15
public setTaggingIndex(secret: DirectionalAppTaggingSecret, index: number) {
16
+ const currentValue = this.taggingIndexMap.get(secret.toString());
17
+ if (currentValue !== undefined && currentValue !== index - 1) {
18
+ throw new Error(`Invalid tagging index update. Current value: ${currentValue}, new value: ${index}`);
19
+ }
20
this.taggingIndexMap.set(secret.toString(), index);
21
22
0 commit comments