aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/util.go')
-rw-r--r--rpc/util.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/util.go b/rpc/util.go
index fb4efdb45..a0d858a67 100644
--- a/rpc/util.go
+++ b/rpc/util.go
@@ -132,6 +132,9 @@ func fromHex(s string) []byte {
if s[0:2] == "0x" {
s = s[2:]
}
+ if len(s)%2 == 1 {
+ s = "0" + s
+ }
return ethutil.Hex2Bytes(s)
}
return nil