From bc609e852afd1c10b0dc9e677d8c37cfde17fc04 Mon Sep 17 00:00:00 2001 From: Aaron Chen Date: Thu, 2 May 2024 16:18:59 +0800 Subject: [PATCH] core/vm: remove redundant error checks (#29692) --- core/vm/contracts.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 527d9f4f470ba..8b648062e9937 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -1123,9 +1123,6 @@ func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { // Compute mapping r := bls12381.MapToG1(fe) - if err != nil { - return nil, err - } // Encode the G1 point to 128 bytes return encodePointG1(&r), nil @@ -1159,9 +1156,6 @@ func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { // Compute mapping r := bls12381.MapToG2(bls12381.E2{A0: c0, A1: c1}) - if err != nil { - return nil, err - } // Encode the G2 point to 256 bytes return encodePointG2(&r), nil