From 9fe5e495f7f83c9a550c8a89204e28332787d3cd Mon Sep 17 00:00:00 2001 From: Vindaar Date: Fri, 14 Jun 2024 11:53:47 +0200 Subject: [PATCH] [Go] rename 2 functions in Go API using KZG -> Kzg (#395) --- constantine-go/constantine.go | 6 +++--- constantine-go/constantine_test.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/constantine-go/constantine.go b/constantine-go/constantine.go index fddfef72..f72e0729 100644 --- a/constantine-go/constantine.go +++ b/constantine-go/constantine.go @@ -85,7 +85,7 @@ func (ctx EthKzgContext) Delete() { C.ctt_eth_trusted_setup_delete(ctx.cCtx) } -func (ctx EthKzgContext) BlobToKZGCommitment(blob EthBlob) (commitment EthKzgCommitment, err error) { +func (ctx EthKzgContext) BlobToKzgCommitment(blob EthBlob) (commitment EthKzgCommitment, err error) { status := C.ctt_eth_kzg_blob_to_kzg_commitment( ctx.cCtx, (*C.ctt_eth_kzg_commitment)(unsafe.Pointer(&commitment)), @@ -189,9 +189,9 @@ func (ctx EthKzgContext) VerifyBlobKzgProofBatch(blobs []EthBlob, commitments [] // Ethereum EIP-4844 KZG API - Parallel // ----------------------------------------------------- -func (ctx EthKzgContext) BlobToKZGCommitmentParallel(blob EthBlob) (commitment EthKzgCommitment, err error) { +func (ctx EthKzgContext) BlobToKzgCommitmentParallel(blob EthBlob) (commitment EthKzgCommitment, err error) { if ctx.threadpool.ctx == nil { - return commitment, errors.New("BlobToKZGCommitmentParallel: The threadpool is not configured.") + return commitment, errors.New("BlobToKzgCommitmentParallel: The threadpool is not configured.") } status := C.ctt_eth_kzg_blob_to_kzg_commitment_parallel( ctx.threadpool.ctx, ctx.cCtx, diff --git a/constantine-go/constantine_test.go b/constantine-go/constantine_test.go index 8fb4578a..170f3241 100644 --- a/constantine-go/constantine_test.go +++ b/constantine-go/constantine_test.go @@ -85,7 +85,7 @@ func (dst *EthKzgEvalAtChallenge) UnmarshalText(input []byte) error { return fromHexImpl(dst[:], input) } -func TestBlobToKZGCommitment(t *testing.T) { +func TestBlobToKzgCommitment(t *testing.T) { type Test struct { Input struct { Blob string `yaml:"blob"` @@ -117,7 +117,7 @@ func TestBlobToKZGCommitment(t *testing.T) { return } - commitment, err := ctx.BlobToKZGCommitment(blob) + commitment, err := ctx.BlobToKzgCommitment(blob) if err == nil { require.NotNil(t, test.Output) require.Equal(t, test.Output[:], commitment[:]) @@ -462,7 +462,7 @@ func createTestThreadpool(t *testing.T) Threadpool { return tp } -func TestBlobToKZGCommitmentParallel(t *testing.T) { +func TestBlobToKzgCommitmentParallel(t *testing.T) { type Test struct { Input struct { Blob string `yaml:"blob"` @@ -497,7 +497,7 @@ func TestBlobToKZGCommitmentParallel(t *testing.T) { continue } - commitment, err := ctx.BlobToKZGCommitmentParallel(blob) + commitment, err := ctx.BlobToKzgCommitmentParallel(blob) if err == nil { require.NotNil(t, test.Output) require.Equal(t, test.Output[:], commitment[:])