-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix error types #89
Fix error types #89
Conversation
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.
im not sure if i consider the error stuff blocking but i think it could be improved. the "let _ =" i believe is a mistake here and i consider blocking, we should not have wrapped results lingering around IMO
zaino-serve/src/rpc/service.rs
Outdated
{ | ||
break; | ||
if height > chain_height { | ||
let _ = channel_tx |
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.
sometimes the compliler asks to put "let _ = " but i think this is bad advice. sometimes its useful to use this to keep something in scope but i still prefer "let _unused_name_of_thing =" in stead of just underscore for that. in this case i believe you need to actually handle your result with a match and error handling or atleast an expect if it cant fail
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.
change added in 724ef3f
zaino-serve/src/rpc/service.rs
Outdated
{ | ||
break; | ||
if height > chain_height { | ||
let _ = channel_tx |
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.
see comment above about "let _ ="
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.
change added in 724ef3f
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.
Great!
Fixes the errors returned for get_block, get_block_range, get_nullifiers, get_nullifiers_range RPCs.