op-geth/tests/helper/common.go

12 lines
165 B
Go
Raw Normal View History

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