mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
all: fix govet (#1562)
This commit is contained in:
parent
71626cff76
commit
ff1867cc45
1 changed files with 12 additions and 2 deletions
|
|
@ -470,7 +470,12 @@ func Sign(m [32]byte, rings []Ring, privkeys []*ecdsa.PrivateKey, s int) (*RingS
|
||||||
return nil, errors.New("could not create ring signature")
|
return nil, errors.New("could not create ring signature")
|
||||||
}
|
}
|
||||||
l_x, l_y := curve.Add(sx, sy, px, py)
|
l_x, l_y := curve.Add(sx, sy, px, py)
|
||||||
L[j][idx] = &ecdsa.PublicKey{curve, l_x, l_y}
|
L[j][idx] = &ecdsa.PublicKey{
|
||||||
|
Curve: curve,
|
||||||
|
X: l_x,
|
||||||
|
Y: l_y,
|
||||||
|
}
|
||||||
|
|
||||||
lT := append(PadTo32Bytes(l_x.Bytes()), PadTo32Bytes(l_y.Bytes())...)
|
lT := append(PadTo32Bytes(l_x.Bytes()), PadTo32Bytes(l_y.Bytes())...)
|
||||||
l = append(l, lT...)
|
l = append(l, lT...)
|
||||||
|
|
||||||
|
|
@ -482,7 +487,12 @@ func Sign(m [32]byte, rings []Ring, privkeys []*ecdsa.PrivateKey, s int) (*RingS
|
||||||
return nil, errors.New("could not create ring signature")
|
return nil, errors.New("could not create ring signature")
|
||||||
}
|
}
|
||||||
r_x, r_y := curve.Add(sx, sy, px, py)
|
r_x, r_y := curve.Add(sx, sy, px, py)
|
||||||
R[j][idx] = &ecdsa.PublicKey{curve, r_x, r_y}
|
R[j][idx] = &ecdsa.PublicKey{
|
||||||
|
Curve: curve,
|
||||||
|
X: r_x,
|
||||||
|
Y: r_y,
|
||||||
|
}
|
||||||
|
|
||||||
rT := append(PadTo32Bytes(r_x.Bytes()), PadTo32Bytes(r_y.Bytes())...)
|
rT := append(PadTo32Bytes(r_x.Bytes()), PadTo32Bytes(r_y.Bytes())...)
|
||||||
l = append(l, rT...)
|
l = append(l, rT...)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue