github.com/karalabe/go-ethereum@v0.8.5/tests/helper/common.go (about)

     1  package helper
     2  
     3  import "github.com/ethereum/go-ethereum/ethutil"
     4  
     5  func FromHex(h string) []byte {
     6  	if ethutil.IsHex(h) {
     7  		h = h[2:]
     8  	}
     9  
    10  	return ethutil.Hex2Bytes(h)
    11  }