mirror of
https://github.com/status-im/nim-rlp.git
synced 2025-02-13 14:36:41 +00:00
Fixed seq[byte] and seq[char] serialization
This commit is contained in:
parent
37b3803fcf
commit
6dddfdf675
@ -186,13 +186,6 @@ proc append*[T](self; listOrBlob: openarray[T]) =
|
||||
for i in 0 ..< listOrBlob.len:
|
||||
self.append listOrBlob[i]
|
||||
|
||||
proc append*[T](self; list: seq[T]) =
|
||||
mixin append
|
||||
|
||||
self.startList list.len
|
||||
for i in 0 ..< list.len:
|
||||
self.append list[i]
|
||||
|
||||
proc append*(self; data: object|tuple, wrapInList = wrapObjectsInList) =
|
||||
# TODO: This append proc should be overloaded by `BytesRange` after
|
||||
# nim bug #7416 is fixed.
|
||||
|
@ -111,7 +111,7 @@ test "malformed/truncated RLP":
|
||||
test "encode byte arrays":
|
||||
var b1 = [byte(1), 2, 5, 7, 8]
|
||||
var b2 = [byte(6), 8, 12, 123]
|
||||
var b3 = [byte(122), 56, 65, 12]
|
||||
var b3 = @[byte(122), 56, 65, 12]
|
||||
|
||||
let rlp = rlpFromBytes(encode((b1, b2, b3)))
|
||||
check:
|
||||
|
Loading…
x
Reference in New Issue
Block a user