-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/nully values #61
Conversation
Strip out unused JSON Update comment Remove echo Added DynamicBytes test More correct naming Remove one extra double check
db31b8f
to
564f826
Compare
var resUInt256Ref: ref UInt256 | ||
|
||
# Nully values | ||
should_be_value_error("null", resAddress) |
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.
As discussed in Discord, the most likely reason for the crashes in the object handling function in nim-json-rpc/jsonmarshal.nim, which is quite happy to propagate nil
values to further calls to fromJson
.
Your tests here are not covering it.
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.
Could you take a look at the tests added below?
@jangko I would suggest rebasing instead of merging master into this |
Well, I plan to squash them, so I think either way is fine. |
Yea, code guidelines & whatnot. Still, best practices are best practices Have fun 🙂 |
When passing
null
or sometimes and empty string to certain value convertors anAssertionError
was raised, crashing my tests.I was seeing crashes when converting to
RlpEncodedBytes
andTypedTransaction
This PR fixes the above, but I'm still looking into how exactly to inject JSON directly into the contract reader for a deeper level of testing.