foundry
foundry copied to clipboard
Make RlpStream::append() return an error when more than reserved number of items are appended
https://github.com/CodeChain-io/codechain/blob/d91b73a0fe81a8a1431e704d9ef73276ef43ef59/util/rlp/src/stream.rs#L397-L409 this tests the behavior. Make the above test pass.
d91b73a0fe81a8a1431e704d9ef73276ef43ef59 added a test case.
I read the code, and this is not the only problem for append().
There are bunches of panic!()s and those should be replaced with the code that throws an errors as this issue points.