Skip to content

Commit

Permalink
chore: fix the rebase build (#6735)
Browse files Browse the repository at this point in the history
* chore: fix the rebase build

* fix test
  • Loading branch information
g11tech committed Jul 30, 2024
1 parent 8688b87 commit 11d0c57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/chain/regen/queued.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class QueuedStateRegenerator implements IStateRegenerator {
*/
updateUnfinalizedPubkeys(validators: UnfinalizedPubkeyIndexMap): void {
let numStatesUpdated = 0;
const states = this.stateCache.getStates();
const states = this.blockStateCache.getStates();
const cpStates = this.checkpointStateCache.getStates();

// Add finalized pubkeys to all states.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import bls from "@chainsafe/bls";
import {ssz} from "@lodestar/types";
import {type CachedBeaconStateAllForks, PubkeyIndexMap} from "@lodestar/state-transition";
import {bytesToBigInt, intToBytes} from "@lodestar/utils";
import {InMemoryCheckpointStateCache, StateContextCache} from "../../../../src/chain/stateCache/index.js";
import {InMemoryCheckpointStateCache, BlockStateCacheImpl} from "../../../../src/chain/stateCache/index.js";
import {BlockStateCache} from "../../../../src/chain/stateCache/types.js";
import {generateCachedElectraState} from "../../../utils/state.js";

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

let checkpointStateCache: InMemoryCheckpointStateCache;
let stateCache: StateContextCache;
let stateCache: BlockStateCache;

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

checkpointStateCache = new InMemoryCheckpointStateCache({});
stateCache = new StateContextCache({});
stateCache = new BlockStateCacheImpl({});

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

0 comments on commit 11d0c57

Please sign in to comment.