From a2d28272ef22a80c9167196145bf29dd6db55dd8 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Thu, 5 Oct 2023 13:31:15 +0300 Subject: [PATCH] native: fix error message on unexpected BLS12-381 curve point Signed-off-by: Anna Shaleva --- pkg/core/native/crypto_blspoints.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/native/crypto_blspoints.go b/pkg/core/native/crypto_blspoints.go index 317d9b795..d09ebd846 100644 --- a/pkg/core/native/crypto_blspoints.go +++ b/pkg/core/native/crypto_blspoints.go @@ -272,7 +272,7 @@ func blsPointPairing(a, b blsPoint) (blsPoint, error) { x = new(bls12381.G1Affine) x.FromJacobian(p) default: - return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g1): %T", x) + return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g1): %T", p) } switch p := b.point.(type) { case *bls12381.G2Affine: @@ -281,7 +281,7 @@ func blsPointPairing(a, b blsPoint) (blsPoint, error) { y = new(bls12381.G2Affine) y.FromJacobian(p) default: - return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g2): %T", x) + return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g2): %T", p) } gt, err := bls12381.Pair([]bls12381.G1Affine{*x}, []bls12381.G2Affine{*y})