Remove async from runForAllImplementations

This commit is contained in:
dapplion 2020-11-29 22:23:48 +00:00
parent 46b317b528
commit d3616e50f6
5 changed files with 6 additions and 5 deletions

2
.gitignore vendored
View File

@ -65,3 +65,5 @@ typings/
dist/
lib/
benchmark-reports
.vscode/

View File

@ -3,9 +3,7 @@ import {runForAllImplementations} from "../switch";
import {IPublicKey, ISignature} from "../../src/interface";
import {randomBytes} from "../../src/helpers";
runForAllImplementations(async (bls, implementation) => {
await bls.init();
runForAllImplementations((bls, implementation) => {
const aggCount = 30;
// verify

View File

@ -15,11 +15,12 @@ export function getBls(implementation: Implementation): IBls {
}
export async function runForAllImplementations(
callback: (bls: IBls, implementation: Implementation) => Promise<void> | void
callback: (bls: IBls, implementation: Implementation) => void
): Promise<void> {
for (const implementation of ["blst", "herumi"] as Implementation[]) {
const bls = getBls(implementation);
await callback(bls, implementation);
await bls.init();
callback(bls, implementation);
}
}