Merge pull request #56 from lispczz/master

Fix the bug of corrupt binfile due to missing await
This commit is contained in:
Jordi Baylina 2020-07-28 13:12:33 +02:00 committed by GitHub
commit 4916068cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ export async function endWriteSection(fd) {
const sectionSize = fd.pos - fd.writingSection.pSectionSize - 8;
const oldPos = fd.pos;
fd.pos = fd.writingSection.pSectionSize;
fd.writeULE64(sectionSize);
await fd.writeULE64(sectionSize);
fd.pos = oldPos;
delete fd.writingSection;
}

View File

@ -25,7 +25,7 @@ export async function writePTauHeader(fd, curve, power, ceremonyPower) {
const oldPos = fd.pos;
fd.writeULE64(headerSize, pHeaderSize);
await fd.writeULE64(headerSize, pHeaderSize);
fd.pos = oldPos;
}
@ -287,7 +287,7 @@ export async function writeContributions(fd, curve, contributions) {
const oldPos = fd.pos;
fd.writeULE64(contributionsSize, pContributionsSize);
await fd.writeULE64(contributionsSize, pContributionsSize);
fd.pos = oldPos;
}