diff options
Diffstat (limited to 'tests/helper/common.go')
-rw-r--r-- | tests/helper/common.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/helper/common.go b/tests/helper/common.go new file mode 100644 index 000000000..6a071968d --- /dev/null +++ b/tests/helper/common.go @@ -0,0 +1,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) +} |