mirror of
https://github.com/tornadocash/snarkjs.git
synced 2024-06-30 13:51:50 +02:00
fix writing binfile
This commit is contained in:
parent
61276e74e6
commit
2fc39d124d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user