Skip to content

Commit 4131637

Browse files
authored
test: improve type check performance (#8611)
**Motivation** Improve type check performance. **Description** - Improve the type check performance which was degraded in recent changes. From `100s` to `8s` for `beacon-node` package. ``` time yarn check-types yarn run v1.22.22 $ tsc ✨ Done in 105.85s. yarn check-types 108.35s user 2.59s system 104% cpu 1:46.08 total ``` vs ``` time yarn check-types yarn run v1.22.22 $ tsc ✨ Done in 8.46s. yarn check-types 14.60s user 0.86s system 178% cpu 8.661 total ``` **Steps to test or reproduce** - Run all jobs
1 parent f0ce024 commit 4131637

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

packages/beacon-node/test/mocks/mockedBeaconChain.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
33
import {ChainForkConfig} from "@lodestar/config";
44
import {config as defaultConfig} from "@lodestar/config/default";
55
import {EpochDifference, ForkChoice, ProtoBlock} from "@lodestar/fork-choice";
6-
import {CachedBeaconStateAllForks} from "@lodestar/state-transition";
76
import {Logger} from "@lodestar/utils";
87
import {BeaconProposerCache} from "../../src/chain/beaconProposerCache.js";
98
import {BeaconChain} from "../../src/chain/chain.js";
@@ -21,7 +20,6 @@ import {getMockedLogger} from "./loggerMock.js";
2120

2221
export type MockedBeaconChain = Mocked<BeaconChain> & {
2322
logger: Mocked<Logger>;
24-
getHeadState: Mocked<CachedBeaconStateAllForks>;
2523
forkChoice: MockedForkChoice;
2624
executionEngine: Mocked<ExecutionEngineHttp>;
2725
executionBuilder: Mocked<ExecutionBuilderHttp>;

0 commit comments

Comments
 (0)