Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rlp/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func decodeByteArray(s *Stream, val reflect.Value) error {
if err != nil {
return err
}
slice := byteArrayBytes(val, val.Len())
slice := val.Bytes()
switch kind {
case Byte:
if len(slice) == 0 {
Expand Down
3 changes: 1 addition & 2 deletions rlp/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ func makeByteArrayWriter(typ reflect.Type) writer {
case 1:
return writeLengthOneByteArray
default:
length := typ.Len()
return func(val reflect.Value, w *encBuffer) error {
if !val.CanAddr() {
// Getting the byte slice of val requires it to be addressable. Make it
Expand All @@ -249,7 +248,7 @@ func makeByteArrayWriter(typ reflect.Type) writer {
copy.Set(val)
val = copy
}
slice := byteArrayBytes(val, length)
slice := val.Bytes()
w.encodeStringHeader(len(slice))
w.str = append(w.str, slice...)
return nil
Expand Down
27 changes: 0 additions & 27 deletions rlp/safe.go

This file was deleted.

30 changes: 0 additions & 30 deletions rlp/unsafe.go

This file was deleted.