-
Notifications
You must be signed in to change notification settings - Fork 0
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
add support for batch requests #2
base: alpen-main
Are you sure you want to change the base?
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.
Some nits and questions but otherwise looks good to me (not very confident about the actual use case/application though).
@@ -309,6 +309,79 @@ macro_rules! fetch_from_rpc { | |||
}}; | |||
} | |||
|
|||
macro_rules! fetch_from_rpc_uncached { |
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.
I find it useful to have an example of how to use this macro somewhere (if writing a test is not feasible).
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 this have been done with just function definition?
break; | ||
}, | ||
Err(_) => { | ||
log_wrn!("\x1b[93mWrn:\x1b[0m An RPC request has timed out, picking new RPC and retrying."); |
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.
Should the string inside be Warn
?
log_wrn!("\x1b[93mWrn:\x1b[0m An RPC request has timed out, picking new RPC and retrying."); | |
log_wrn!("\x1b[93mWarn:\x1b[0m An RPC request has timed out, picking new RPC and retrying."); |
Adds support for batch requests for http request.
TODO: support batch requests in ws requests.