Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao committed Jul 11, 2024
1 parent db541f1 commit 5ab46a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions coordinator/internal/logic/verifier/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (v *Verifier) VerifyBatchProof(proof *coordinatorType.BatchProof, forkName
C.free(unsafe.Pointer(forkNameStr))
}()

verified := C.verify_batch_proof(proofStr)
verified := C.verify_batch_proof(proofStr, forkNameStr)
return verified != 0, nil
}

Expand All @@ -115,13 +115,15 @@ func (v *Verifier) VerifyChunkProof(proof *coordinatorType.ChunkProof, forkName
return false, err
}

log.Info("Start to verify chunk proof", "forkName", forkName)
proofStr := C.CString(string(buf))
forkNameStr := C.CString(forkName)
defer func() {
C.free(unsafe.Pointer(proofStr))
C.free(unsafe.Pointer(forkNameStr))
}()

log.Info("Start to verify chunk proof", "forkName", forkName)
verified := C.verify_chunk_proof(proofStr, forkName)
verified := C.verify_chunk_proof(proofStr, forkNameStr)
return verified != 0, nil
}

Expand Down

0 comments on commit 5ab46a1

Please sign in to comment.