From bc17dba8fba0f3007398f231f07916a95ed963ac Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 1 Jul 2015 02:09:02 +0200 Subject: rlp: add Split functions These functions allow destructuring of raw rlp-encoded bytes without the overhead of reflection or copying. --- rlp/decode_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rlp/decode_test.go') diff --git a/rlp/decode_test.go b/rlp/decode_test.go index d6b0611dd..ce4f9ecc8 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -24,6 +24,7 @@ import ( "io" "math/big" "reflect" + "strings" "testing" ) @@ -725,7 +726,7 @@ func encodeTestSlice(n uint) []byte { } func unhex(str string) []byte { - b, err := hex.DecodeString(str) + b, err := hex.DecodeString(strings.Replace(str, " ", "", -1)) if err != nil { panic(fmt.Sprintf("invalid hex string: %q", str)) } -- cgit