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

pull/29696/head
Aaron Chen 6 months ago committed by GitHub
parent 682ee820fa
commit bc609e852a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      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

Loading…
Cancel
Save