From 6e3b58e491c822cc6e4aa822c31c6dee034e3df9 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 9 Jun 2015 16:03:05 +0200 Subject: [PATCH] Remove unneeded if check on EC recover padding --- core/vm/contracts.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index b5cb9ccd2c..90e356b1d3 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -67,9 +67,7 @@ func ripemd160Func(in []byte) []byte { const ecRecoverInputLength = 128 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 // but for ecrecover we want (r, s, v)