aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/raw.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-09-09 09:34:15 +0800
committerFelix Lange <fjl@twurst.com>2015-09-11 01:41:51 +0800
commit24bb68e7cf546153436f1d38a7227fdf75d73343 (patch)
treefa85e497a639af7aa8ad1cc83dc09fe104fbd7df /rlp/raw.go
parentbc17dba8fba0f3007398f231f07916a95ed963ac (diff)
downloadgo-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar.gz
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar.bz2
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar.lz
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar.xz
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.tar.zst
go-tangerine-24bb68e7cf546153436f1d38a7227fdf75d73343.zip
rlp: add RawValue
Diffstat (limited to 'rlp/raw.go')
-rw-r--r--rlp/raw.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/rlp/raw.go b/rlp/raw.go
index e93c4df40..fca445618 100644
--- a/rlp/raw.go
+++ b/rlp/raw.go
@@ -16,7 +16,17 @@
package rlp
-import "io"
+import (
+ "io"
+ "reflect"
+)
+
+// RawValue represents an encoded RLP value and can be used to delay
+// RLP decoding or precompute an encoding. Note that the decoder does
+// not verify whether the content of RawValues is valid RLP.
+type RawValue []byte
+
+var rawValueType = reflect.TypeOf(RawValue{})
// Split returns the content of first RLP value and any
// bytes after the value as subslices of b.