aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helper/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helper/common.go')
-rw-r--r--tests/helper/common.go11
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)
+}