@0xpolygonid/js-sdk 1.38.1 → 1.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/esm/index.js +6 -6
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.global.js +1 -1
- package/dist/browser/umd/index.global.js.map +1 -1
- package/dist/node/cjs/index.cjs +6 -6
- package/dist/node/cjs/index.cjs.map +1 -1
- package/dist/node/esm/index.js +6 -6
- package/dist/node/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/storage/blockchain/state.ts +6 -6
package/package.json
CHANGED
|
@@ -386,7 +386,7 @@ export class EthStateStorage implements IStateStorage {
|
|
|
386
386
|
|
|
387
387
|
/** {@inheritdoc IStateStorage.getGISTRootInfo} */
|
|
388
388
|
async getGISTRootInfo(root: bigint, id: bigint): Promise<RootInfo> {
|
|
389
|
-
const cacheKey = this.getRootCacheKey(root);
|
|
389
|
+
const cacheKey = this.getRootCacheKey(id, root);
|
|
390
390
|
if (!this._disableCache) {
|
|
391
391
|
// Check cache first
|
|
392
392
|
const cachedResult = await this._rootResolveCache?.get(cacheKey);
|
|
@@ -454,18 +454,18 @@ export class EthStateStorage implements IStateStorage {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
private getGistProofCacheKey(id: bigint): string {
|
|
457
|
-
return `gist
|
|
457
|
+
return `gist:${id.toString()}`;
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
private getLatestStateCacheKey(id: bigint): string {
|
|
461
|
-
return `latest
|
|
461
|
+
return `latest-state:${id.toString()}`;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
private getStateCacheKey(id: bigint, state: bigint): string {
|
|
465
|
-
return
|
|
465
|
+
return `state:${id.toString()}-${state.toString()}`;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
private getRootCacheKey(root: bigint): string {
|
|
469
|
-
return root.toString()
|
|
468
|
+
private getRootCacheKey(id: bigint, root: bigint): string {
|
|
469
|
+
return `root:${id.toString()}-${root.toString()}`;
|
|
470
470
|
}
|
|
471
471
|
}
|