mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 13:36:37 +00:00
Remove unneeded if check on EC recover padding
This commit is contained in:
parent
15166f880b
commit
6e3b58e491
1 changed files with 1 additions and 3 deletions
|
|
@ -67,9 +67,7 @@ func ripemd160Func(in []byte) []byte {
|
||||||
const ecRecoverInputLength = 128
|
const ecRecoverInputLength = 128
|
||||||
|
|
||||||
func ecrecoverFunc(in []byte) []byte {
|
func ecrecoverFunc(in []byte) []byte {
|
||||||
if len(in) < ecRecoverInputLength {
|
in = common.RightPadBytes(in, 128)
|
||||||
in = common.RightPadBytes(in, 128)
|
|
||||||
}
|
|
||||||
// "in" is (hash, v, r, s), each 32 bytes
|
// "in" is (hash, v, r, s), each 32 bytes
|
||||||
// but for ecrecover we want (r, s, v)
|
// but for ecrecover we want (r, s, v)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue