Skip to content

Commit 929e49e

Browse files
committed
chore: fix the rebase build (ChainSafe#6735)
* chore: fix the rebase build * fix test
1 parent ea52e9d commit 929e49e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/beacon-node/src/chain/regen/queued.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class QueuedStateRegenerator implements IStateRegenerator {
201201
*/
202202
updateUnfinalizedPubkeys(validators: UnfinalizedPubkeyIndexMap): void {
203203
let numStatesUpdated = 0;
204-
const states = this.stateCache.getStates();
204+
const states = this.blockStateCache.getStates();
205205
const cpStates = this.checkpointStateCache.getStates();
206206

207207
// Add finalized pubkeys to all states.

packages/beacon-node/test/perf/chain/stateCache/updateUnfinalizedPubkeys.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import bls from "@chainsafe/bls";
77
import {ssz} from "@lodestar/types";
88
import {type CachedBeaconStateAllForks, PubkeyIndexMap} from "@lodestar/state-transition";
99
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";
1112
import {generateCachedElectraState} from "../../../utils/state.js";
1213

1314
// Benchmark date from Mon Nov 21 2023 - Intel Core i7-9750H @ 2.60Ghz
@@ -22,7 +23,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
2223
const numStateCache = 3 * 32;
2324

2425
let checkpointStateCache: InMemoryCheckpointStateCache;
25-
let stateCache: StateContextCache;
26+
let stateCache: BlockStateCache;
2627

2728
const unfinalizedPubkey2Index = generatePubkey2Index(0, Math.max.apply(null, numPubkeysToBeFinalizedCases));
2829
const baseState = generateCachedElectraState();
@@ -36,7 +37,7 @@ describe("updateUnfinalizedPubkeys perf tests", function () {
3637
baseState.epochCtx.index2pubkey = [];
3738

3839
checkpointStateCache = new InMemoryCheckpointStateCache({});
39-
stateCache = new StateContextCache({});
40+
stateCache = new BlockStateCacheImpl({});
4041

4142
for (let i = 0; i < numCheckpointStateCache; i++) {
4243
const clonedState = baseState.clone();

0 commit comments

Comments
 (0)