-
Notifications
You must be signed in to change notification settings - Fork 94
Conversation
It looks like @michaelvoronov hasn't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io Once you've signed, please reply to this thread with Many thanks, Parity Technologies CLA Bot |
[clabot:check] |
It looks like @michaelvoronov signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
loop { | ||
let subsection_type: u8 = match VarUint7::deserialize(rdr) { | ||
Ok(raw_subsection_type) => raw_subsection_type.into(), | ||
// todo: be more selective detecting no more subsection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach of parsing is very similar to section deserialization (and this cmt comes directly from it:)).
But it seems a little bit unreliable because there could be different types of IO errors, and we are interested only in UnexpectedEof
here. I don't dig too much to parity-wasm internals, but in my point of view, the corner case of this problem is here when all IO errors map to Error::HeapOther, so it is impossible in section and subsections parsing to distinguish UnexpectedEof
from other errors.
Awesome, thanks! |
Resolves #268