From 5ab46a14457c34a204db222305f409251ae033f0 Mon Sep 17 00:00:00 2001 From: georgehao Date: Thu, 11 Jul 2024 19:08:55 +0800 Subject: [PATCH] fix --- coordinator/internal/logic/verifier/verifier.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/coordinator/internal/logic/verifier/verifier.go b/coordinator/internal/logic/verifier/verifier.go index 0c6ed93b05..f19df27f89 100644 --- a/coordinator/internal/logic/verifier/verifier.go +++ b/coordinator/internal/logic/verifier/verifier.go @@ -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 } @@ -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 }