Skip to content

Commit 8a039ab

Browse files
committed
Adding fix to avoid duplicate entries in fee analyzer service
1 parent f16477c commit 8a039ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/library/src/hooks/RuntimeFeeAnalyzerService.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class RuntimeFeeAnalyzerService extends ConfigurableModule<RuntimeFeeAnal
8181
});
8282

8383
container.resolve(RuntimeMethodExecutionContext).clear();
84-
84+
let methodCounter = 0;
8585
const [values, indexes] =
8686
await this.runtime.zkProgrammable.zkProgram.reduce<
8787
Promise<[FeeTreeValues, FeeIndexes]>
@@ -93,7 +93,7 @@ export class RuntimeFeeAnalyzerService extends ConfigurableModule<RuntimeFeeAnal
9393
[FeeTreeValues, FeeIndexes]
9494
>(
9595
// eslint-disable-next-line @typescript-eslint/no-shadow
96-
([values, indexes], combinedMethodName, index) => {
96+
([values, indexes], combinedMethodName) => {
9797
const { rows } = analyzedMethods[combinedMethodName];
9898
// const rows = 1000;
9999
const [moduleName, methodName] = combinedMethodName.split(".");
@@ -128,7 +128,8 @@ export class RuntimeFeeAnalyzerService extends ConfigurableModule<RuntimeFeeAnal
128128
},
129129
{
130130
...indexes,
131-
[methodId.toString()]: BigInt(index),
131+
// eslint-disable-next-line no-plusplus
132+
[methodId.toString()]: BigInt(methodCounter++),
132133
},
133134
];
134135
},

0 commit comments

Comments
 (0)