core/vm: remove redundant error checks (#29692)

This commit is contained in:
Aaron Chen 2024-05-02 16:18:59 +08:00 committed by GitHub
parent 682ee820fa
commit bc609e852a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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