mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
appease felix, hes right next to me
This commit is contained in:
parent
d2bcbab38d
commit
c8d92ec016
2 changed files with 3 additions and 5 deletions
|
|
@ -43,9 +43,8 @@ func (g *G1) Unmarshal(buf []byte) (int, error) {
|
|||
return 0, errors.New("invalid G1 point size")
|
||||
}
|
||||
|
||||
// Check if both coordinates are zero (point at infinity)
|
||||
isZero := allZeroes(buf[0:64])
|
||||
if isZero {
|
||||
if allZeroes(buf[:64]) {
|
||||
// point at infinity
|
||||
g.inner.X.SetZero()
|
||||
g.inner.Y.SetZero()
|
||||
return 64, nil
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ func (g *G2) Unmarshal(buf []byte) (int, error) {
|
|||
return 0, errors.New("invalid G2 point size")
|
||||
}
|
||||
|
||||
isZero := allZeroes(buf[0:128])
|
||||
if isZero {
|
||||
if allZeroes(buf[:128]) {
|
||||
// point at infinity
|
||||
g.inner.X.A0.SetZero()
|
||||
g.inner.X.A1.SetZero()
|
||||
|
|
|
|||
Loading…
Reference in a new issue