Remove async from runForAllImplementations
This commit is contained in:
parent
46b317b528
commit
d3616e50f6
|
@ -65,3 +65,5 @@ typings/
|
||||||
dist/
|
dist/
|
||||||
lib/
|
lib/
|
||||||
benchmark-reports
|
benchmark-reports
|
||||||
|
|
||||||
|
.vscode/
|
||||||
|
|
|
@ -3,9 +3,7 @@ import {runForAllImplementations} from "../switch";
|
||||||
import {IPublicKey, ISignature} from "../../src/interface";
|
import {IPublicKey, ISignature} from "../../src/interface";
|
||||||
import {randomBytes} from "../../src/helpers";
|
import {randomBytes} from "../../src/helpers";
|
||||||
|
|
||||||
runForAllImplementations(async (bls, implementation) => {
|
runForAllImplementations((bls, implementation) => {
|
||||||
await bls.init();
|
|
||||||
|
|
||||||
const aggCount = 30;
|
const aggCount = 30;
|
||||||
|
|
||||||
// verify
|
// verify
|
||||||
|
|
|
@ -15,11 +15,12 @@ export function getBls(implementation: Implementation): IBls {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function runForAllImplementations(
|
export async function runForAllImplementations(
|
||||||
callback: (bls: IBls, implementation: Implementation) => Promise<void> | void
|
callback: (bls: IBls, implementation: Implementation) => void
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
for (const implementation of ["blst", "herumi"] as Implementation[]) {
|
for (const implementation of ["blst", "herumi"] as Implementation[]) {
|
||||||
const bls = getBls(implementation);
|
const bls = getBls(implementation);
|
||||||
await callback(bls, implementation);
|
await bls.init();
|
||||||
|
callback(bls, implementation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue