diff options
author | Felix Lange <fjl@twurst.com> | 2014-12-30 18:40:32 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-01-15 18:00:19 +0800 |
commit | 552f5b2693a5d19c126a8116d36ba1f4f6cb76a1 (patch) | |
tree | a28efc122113ab7bb48df40ad3215af304cada2c /rlp/decode_test.go | |
parent | bb55307a9d8fa73b0fbc0727f8b80925a87627b7 (diff) | |
download | go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar.gz go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar.bz2 go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar.lz go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar.xz go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.tar.zst go-tangerine-552f5b2693a5d19c126a8116d36ba1f4f6cb76a1.zip |
rlp: add functions for encoding
I'm reasonably confident that the encoding matches the output of
ethutil.Encode for values that it supports. Some of the tests have been
adpated from the Ethereum testing repository.
There are still TODOs in the code.
Diffstat (limited to 'rlp/decode_test.go')
-rw-r--r-- | rlp/decode_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 18ea63a09..35d8dc1fc 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -509,7 +509,7 @@ func ExampleStream() { } func BenchmarkDecode(b *testing.B) { - enc := encTest(90000) + enc := encodeTestSlice(90000) b.SetBytes(int64(len(enc))) b.ReportAllocs() b.ResetTimer() @@ -524,7 +524,7 @@ func BenchmarkDecode(b *testing.B) { } func BenchmarkDecodeIntSliceReuse(b *testing.B) { - enc := encTest(100000) + enc := encodeTestSlice(100000) b.SetBytes(int64(len(enc))) b.ReportAllocs() b.ResetTimer() @@ -538,7 +538,7 @@ func BenchmarkDecodeIntSliceReuse(b *testing.B) { } } -func encTest(n int) []byte { +func encodeTestSlice(n int) []byte { s := make([]interface{}, n) for i := 0; i < n; i++ { s[i] = i |