Tags: kubo39/rlp
Tags
decode: make list consume only its own payload The list decoder looped until input was empty, so it swallowed any bytes following the list and could not decode concatenated lists. Slice out the payloadLen bytes that belong to the list, consume exactly that much from input, and decode elements within that slice.
decode: set isList for every prefix and reject byte string as list decodeHeader left isList unset for the short byte-string prefixes (0x00..0x7F, 0x80..0xB7), so the list decoders relied on the caller's isList: true init value and could not reject a byte string given where a list was expected. Set isList explicitly for every prefix and turn the assert(header.isList) guards into enforce!UnexpectedString.