Skip to content

Commit

Permalink
fix serializeCommitment (#651)
Browse files Browse the repository at this point in the history
Resolves #645
  • Loading branch information
SherLzp committed Apr 20, 2023
1 parent bc57850 commit ee248a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions constraint/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func (i *Commitment) SerializeCommitment(privateCommitment []byte, publicCommitt
copy(res, privateCommitment)

offset := len(privateCommitment)
for j, inJ := range publicCommitted {
offset += j * fieldByteLen
for _, inJ := range publicCommitted {
inJ.FillBytes(res[offset : offset+fieldByteLen])
offset += fieldByteLen
}

return res
Expand Down

0 comments on commit ee248a4

Please sign in to comment.