Nim: add the missing commas in the JSON export :)

This commit is contained in:
Balazs Komuves 2023-12-15 17:21:34 +01:00
parent 30740a86b5
commit 2f30a0cef8
No known key found for this signature in database
GPG Key ID: F63B7AEF18435562

View File

@ -97,16 +97,16 @@ proc exportProofInput*(fname: string, prfInput: SlotProofInput) =
h.writeLine("{")
h.writeLine(" \"dataSetRoot\": " & toQuotedDecimalF(prfInput.dataSetRoot) )
h.writeLine(" \"entropy\": " & toQuotedDecimalF(prfInput.entropy ) )
h.writeLine(" \"nCellsPerSlot\": " & $(prfInput.nCells) )
h.writeLine(" \"nSlotsPerDataSet\": " & $(prfInput.nSlots) )
h.writeLine(" \"slotIndex\": " & $(prfInput.slotIndex) )
h.writeLine(" \"slotRoot\": " & toQuotedDecimalF(prfInput.slotRoot) )
h.writeLine(" \"slotProof\":")
h.writeLine(", \"entropy\": " & toQuotedDecimalF(prfInput.entropy ) )
h.writeLine(", \"nCellsPerSlot\": " & $(prfInput.nCells) )
h.writeLine(", \"nSlotsPerDataSet\": " & $(prfInput.nSlots) )
h.writeLine(", \"slotIndex\": " & $(prfInput.slotIndex) )
h.writeLine(", \"slotRoot\": " & toQuotedDecimalF(prfInput.slotRoot) )
h.writeLine(", \"slotProof\":")
writeSingleMerklePath(h, " ", prfInput.slotProof )
h.writeLine(" \"cellData\":")
h.writeLine(", \"cellData\":")
writeAllCellData(h, collect( newSeq , (for p in prfInput.proofInputs: p.cellData) ))
h.writeLine(" \"merklePaths\":")
h.writeLine(", \"merklePaths\":")
writeAllMerklePaths(h, collect( newSeq , (for p in prfInput.proofInputs: p.merkleProof) ))
h.writeLine("}")