From fe9127551da2f01423faef5c8a6482bca8519b64 Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Mon, 23 Oct 2023 09:32:23 +0800 Subject: [PATCH] Revert "U" This reverts commit e718d423e9d4cde8788f3a4d8106dcda27f30932. --- prover/core/prover.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prover/core/prover.go b/prover/core/prover.go index 338c5a4218..c006e2dd23 100644 --- a/prover/core/prover.go +++ b/prover/core/prover.go @@ -42,7 +42,7 @@ func NewProverCore(cfg *config.ProverCoreConfig) (*ProverCore, error) { var vk string var rawVK *C.char - defer C.free_c_chars(unsafe.Pointer(rawVK)) + defer C.free_c_chars(rawVK) if cfg.ProofType == message.ProofTypeBatch { C.init_batch_prover(paramsPathStr, assetsPathStr) rawVK = C.get_batch_vk() @@ -162,7 +162,7 @@ func (p *ProverCore) checkChunkProofs(chunkProofsByt []byte) (bool, error) { log.Info("Start to check chunk proofs ...") cResult := C.check_chunk_proofs(chunkProofsStr) - defer C.free_c_chars(unsafe.Pointer(cResult)) + defer C.free_c_chars(cResult) log.Info("Finish checking chunk proofs!") var result CheckChunkProofsResponse @@ -189,7 +189,7 @@ func (p *ProverCore) proveBatch(chunkInfosByt []byte, chunkProofsByt []byte) ([] log.Info("Start to create batch proof ...") bResult := C.gen_batch_proof(chunkInfosStr, chunkProofsStr) - defer C.free_c_chars(unsafe.Pointer(bResult)) + defer C.free_c_chars(bResult) log.Info("Finish creating batch proof!") var result ProofResult @@ -211,7 +211,7 @@ func (p *ProverCore) proveChunk(tracesByt []byte) ([]byte, error) { log.Info("Start to create chunk proof ...") cProof := C.gen_chunk_proof(tracesStr) - defer C.free_c_chars(unsafe.Pointer(cProof)) + defer C.free_c_chars(cProof) log.Info("Finish creating chunk proof!") var result ProofResult @@ -243,7 +243,7 @@ func (p *ProverCore) mayDumpProof(id string, proofByt []byte) error { func (p *ProverCore) tracesToChunkInfo(tracesByt []byte) []byte { tracesStr := C.CString(string(tracesByt)) - defer C.free_c_chars(unsafe.Pointer(tracesStr)) + defer C.free_c_chars(tracesStr) cChunkInfo := C.block_traces_to_chunk_info(tracesStr) defer C.free(unsafe.Pointer(cChunkInfo))