go-ethereum/tests/helper/common.go

12 lines
163 B
Go
Raw Normal View History

2014-10-14 17:41:00 -05:00
package helper
import "github.com/ethereum/eth-go/ethutil"
func FromHex(h string) []byte {
if ethutil.IsHex(h) {
h = h[2:]
}
return ethutil.Hex2Bytes(h)
}