From d7e396a98ccafb53b4f632228b670634baeb36a0 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 1 Jul 2014 23:59:37 +0200 Subject: [PATCH] l <=> r --- ethutil/bytes.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ethutil/bytes.go b/ethutil/bytes.go index 5737a75c9..ad60e62fd 100644 --- a/ethutil/bytes.go +++ b/ethutil/bytes.go @@ -119,7 +119,6 @@ func FormatData(data string) []byte { d := new(big.Int) if data[0:1] == "\"" && data[len(data)-1:] == "\"" { return RightPadBytes([]byte(data), 32) - //d.SetBytes([]byte(data[1 : len(data)-1])) } else if len(data) > 1 && data[:2] == "0x" { d.SetBytes(Hex2Bytes(data[2:])) } else { @@ -129,7 +128,7 @@ func FormatData(data string) []byte { return BigToBytes(d, 256) } -func LeftPadBytes(slice []byte, l int) []byte { +func RightPadBytes(slice []byte, l int) []byte { if l <= len(slice) { return slice } @@ -140,7 +139,7 @@ func LeftPadBytes(slice []byte, l int) []byte { return padded } -func RightPadBytes(slice []byte, l int) []byte { +func LeftPadBytes(slice []byte, l int) []byte { if l <= len(slice) { return slice }