Skip to content

Commit 6e3b58e

Browse files
author
Gustav Simonsson
committed
Remove unneeded if check on EC recover padding
1 parent 15166f8 commit 6e3b58e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/vm/contracts.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ func ripemd160Func(in []byte) []byte {
6767
const ecRecoverInputLength = 128
6868

6969
func ecrecoverFunc(in []byte) []byte {
70-
if len(in) < ecRecoverInputLength {
71-
in = common.RightPadBytes(in, 128)
72-
}
70+
in = common.RightPadBytes(in, 128)
7371
// "in" is (hash, v, r, s), each 32 bytes
7472
// but for ecrecover we want (r, s, v)
7573

0 commit comments

Comments
 (0)