diff options
author | Maran <maran.hidskes@gmail.com> | 2015-03-14 18:39:35 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2015-03-14 18:39:35 +0800 |
commit | 991993357c902eaab56726bef97e7494674aa5e5 (patch) | |
tree | 1277d00e29b3444290664cd07529a3f006cb7b6b /rpc/util.go | |
parent | b927c29469864424a97c06ff2f31e2d882b01cd7 (diff) | |
download | dexon-991993357c902eaab56726bef97e7494674aa5e5.tar.gz dexon-991993357c902eaab56726bef97e7494674aa5e5.tar.zst dexon-991993357c902eaab56726bef97e7494674aa5e5.zip |
DRY up the use of fromHex and put it in ethutil
Diffstat (limited to 'rpc/util.go')
-rw-r--r-- | rpc/util.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/rpc/util.go b/rpc/util.go index 573190e59..4acd90284 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -128,19 +128,6 @@ func toHex(b []byte) string { return "0x" + hex } -func fromHex(s string) []byte { - if len(s) > 1 { - if s[0:2] == "0x" { - s = s[2:] - } - if len(s)%2 == 1 { - s = "0" + s - } - return ethutil.Hex2Bytes(s) - } - return nil -} - func i2hex(n int) string { return toHex(big.NewInt(int64(n)).Bytes()) } |