Skip to content
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

Open
wants to merge 2 commits into
base: alpen-main
Choose a base branch
from
Open

Conversation

sapinb
Copy link
Collaborator

@sapinb sapinb commented Jan 21, 2025

Adds support for batch requests for http request.
TODO: support batch requests in ws requests.

@sapinb sapinb requested a review from Rajil1213 January 21, 2025 13:56
Copy link

@Rajil1213 Rajil1213 left a 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 {

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).

Copy link

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.");

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?

Suggested change
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.");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants