mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 16:18:17 -05:00
fix: e2e tests
This commit is contained in:
@@ -110,7 +110,7 @@ export class Lightclient {
|
||||
|
||||
private runStatus: RunStatus = {code: RunStatusCode.stopped};
|
||||
|
||||
constructor({config, logger, genesisData, bootstrap, transport, blsImplementation}: LightclientInitArgs) {
|
||||
private constructor({config, logger, genesisData, bootstrap, transport, blsImplementation}: LightclientInitArgs) {
|
||||
this.genesisTime = genesisData.genesisTime;
|
||||
this.genesisValidatorsRoot =
|
||||
typeof genesisData.genesisValidatorsRoot === "string"
|
||||
@@ -154,8 +154,9 @@ export class Lightclient {
|
||||
checkpointRoot: phase0.Checkpoint["root"];
|
||||
}
|
||||
): Promise<Lightclient> {
|
||||
const {transport, checkpointRoot} = args;
|
||||
const {transport, checkpointRoot, blsImplementation} = args;
|
||||
|
||||
await initBls(blsImplementation);
|
||||
// Fetch bootstrap state with proof at the trusted block root
|
||||
const {data: bootstrap} = await transport.getBootstrap(toHexString(checkpointRoot));
|
||||
|
||||
@@ -185,7 +186,7 @@ export class Lightclient {
|
||||
// Do not block the event loop
|
||||
void this.runLoop();
|
||||
|
||||
return initBls(this.blsImplementation).then(() => startPromise);
|
||||
return startPromise;
|
||||
}
|
||||
|
||||
stop(): void {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import path from "node:path";
|
||||
import {defineConfig, mergeConfig} from "vitest/config";
|
||||
import vitestConfig from "./vitest.base.unit.config.js";
|
||||
|
||||
@@ -15,5 +16,10 @@ export default mergeConfig(
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@chainsafe/blst": path.join(__dirname, "scripts/vitest/polyfills/emptyModule.js"),
|
||||
},
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user