From fc8b246109760714a838f4be163cca1dbb998163 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 10 Sep 2015 14:48:19 +0200 Subject: rlp: move ListSize to raw.go --- rlp/raw.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rlp/raw.go') diff --git a/rlp/raw.go b/rlp/raw.go index fca445618..33aae6ee5 100644 --- a/rlp/raw.go +++ b/rlp/raw.go @@ -28,6 +28,12 @@ type RawValue []byte var rawValueType = reflect.TypeOf(RawValue{}) +// ListSize returns the encoded size of an RLP list with the given +// content size. +func ListSize(contentSize uint64) uint64 { + return uint64(headsize(contentSize)) + contentSize +} + // Split returns the content of first RLP value and any // bytes after the value as subslices of b. func Split(b []byte) (k Kind, content, rest []byte, err error) { -- cgit