@@ -7,7 +7,8 @@ import bls from "@chainsafe/bls";
7
7
import { ssz } from "@lodestar/types" ;
8
8
import { type CachedBeaconStateAllForks , PubkeyIndexMap } from "@lodestar/state-transition" ;
9
9
import { bytesToBigInt , intToBytes } from "@lodestar/utils" ;
10
- import { InMemoryCheckpointStateCache , StateContextCache } from "../../../../src/chain/stateCache/index.js" ;
10
+ import { InMemoryCheckpointStateCache , BlockStateCacheImpl } from "../../../../src/chain/stateCache/index.js" ;
11
+ import { BlockStateCache } from "../../../../src/chain/stateCache/types.js" ;
11
12
import { generateCachedElectraState } from "../../../utils/state.js" ;
12
13
13
14
// Benchmark date from Mon Nov 21 2023 - Intel Core i7-9750H @ 2.60Ghz
@@ -22,7 +23,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
22
23
const numStateCache = 3 * 32 ;
23
24
24
25
let checkpointStateCache : InMemoryCheckpointStateCache ;
25
- let stateCache : StateContextCache ;
26
+ let stateCache : BlockStateCache ;
26
27
27
28
const unfinalizedPubkey2Index = generatePubkey2Index ( 0 , Math . max . apply ( null , numPubkeysToBeFinalizedCases ) ) ;
28
29
const baseState = generateCachedElectraState ( ) ;
@@ -36,7 +37,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
36
37
baseState . epochCtx . index2pubkey = [ ] ;
37
38
38
39
checkpointStateCache = new InMemoryCheckpointStateCache ( { } ) ;
39
- stateCache = new StateContextCache ( { } ) ;
40
+ stateCache = new BlockStateCacheImpl ( { } ) ;
40
41
41
42
for ( let i = 0 ; i < numCheckpointStateCache ; i ++ ) {
42
43
const clonedState = baseState . clone ( ) ;
0 commit comments