quorum/tests/helper/common.go

12 lines
165 B
Go
Raw Normal View History

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