plugeth/tests/helper/common.go

12 lines
165 B
Go
Raw Normal View History

2014-10-14 22:41:00 +00:00
package helper
2015-03-16 10:27:38 +00:00
import "github.com/ethereum/go-ethereum/common"
2014-10-14 22:41:00 +00:00
func FromHex(h string) []byte {
2015-03-16 10:27:38 +00:00
if common.IsHex(h) {
2014-10-14 22:41:00 +00:00
h = h[2:]
}
2015-03-16 10:27:38 +00:00
return common.Hex2Bytes(h)
2014-10-14 22:41:00 +00:00
}