Remove async from runForAllImplementations
This commit is contained in:
parent
46b317b528
commit
d3616e50f6
|
@ -65,3 +65,5 @@ typings/
|
|||
dist/
|
||||
lib/
|
||||
benchmark-reports
|
||||
|
||||
.vscode/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue