aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/decode_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-07-01 08:09:02 +0800
committerFelix Lange <fjl@twurst.com>2015-09-11 01:41:51 +0800
commitbc17dba8fba0f3007398f231f07916a95ed963ac (patch)
tree3012f4338d04b20d4399c31b09c7e20766075ad8 /rlp/decode_test.go
parentac32f52ca6e620556e7a875f0d52ddef72215532 (diff)
downloaddexon-bc17dba8fba0f3007398f231f07916a95ed963ac.tar.gz
dexon-bc17dba8fba0f3007398f231f07916a95ed963ac.tar.zst
dexon-bc17dba8fba0f3007398f231f07916a95ed963ac.zip
rlp: add Split functions
These functions allow destructuring of raw rlp-encoded bytes without the overhead of reflection or copying.
Diffstat (limited to 'rlp/decode_test.go')
-rw-r--r--rlp/decode_test.go3
1 files changed, 2 insertions, 1 deletions
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))
}