Skip to content

Commit

Permalink
rlp: move ListSize to raw.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Sep 10, 2015
1 parent 24bb68e commit fc8b246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions rlp/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ type Encoder interface {
EncodeRLP(io.Writer) error
}

// ListSize returns the encoded size of an RLP list with the given
// content size.
func ListSize(contentSize uint64) uint64 {
return uint64(headsize(contentSize)) + contentSize
}

// Encode writes the RLP encoding of val to w. Note that Encode may
// perform many small writes in some cases. Consider making w
// buffered.
Expand Down
6 changes: 6 additions & 0 deletions rlp/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fc8b246

Please sign in to comment.