aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helper/common.go
blob: 6a071968d2fa9d481517932e2d5b513c0f3af691 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
package helper

import "github.com/ethereum/go-ethereum/ethutil"

func FromHex(h string) []byte {
    if ethutil.IsHex(h) {
        h = h[2:]
    }

    return ethutil.Hex2Bytes(h)
}