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

refactor: remove rpc_client::ApiInfo #4280

Merged
merged 10 commits into from
May 2, 2024
Merged

Conversation

aatifsyed
Copy link
Contributor

Summary of changes

Changes introduced in this pull request:

  • Add rpc::Client::default_or_from_env
  • Use Url::password to pass in token information in rpc::Client
  • Wherever ApiInfo was present, now use rpc::Client or Arc<rpc::Client>
  • Delete crate::rpc_client
    • rpc_client::RpcRequest is now rpc::Request
  • (minor) rename OneClientInner to UrlClientInner
  • (minor) rename EndpointStatus to TestSummary
  • (minor) convert static to const for permissions, more efficient permission checking code.
  • remove following tests:
    • CHAIN_NOTIFY. Not actually tested
    • STATE_DECODE_PARAMS. Not actually tested, not actually implemented

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.
    • No user facing changes

@aatifsyed aatifsyed requested a review from a team as a code owner May 1, 2024 08:23
@aatifsyed aatifsyed requested review from ruseinov and sudo-shashank and removed request for a team May 1, 2024 08:23
@aatifsyed aatifsyed enabled auto-merge May 1, 2024 09:09
@aatifsyed aatifsyed requested a review from hanabi1224 May 1, 2024 09:28
#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
enum EndpointStatus {
// RPC method is missing
enum TestSummary {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonblocking nit: I'm unsure if I like TestSummary naming, but I can't figure out a better one. This kinda mixes several different concepts together, like actual response errors, check errors and an actual valid status. Perhaps something like TestStatus would be more intelligible. In my head summary is something that could potentially have several properties, but here we always have only one outcome.

Copy link
Contributor

@ruseinov ruseinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@aatifsyed aatifsyed added this pull request to the merge queue May 2, 2024
Merged via the queue into main with commit bf09962 May 2, 2024
28 checks passed
@aatifsyed aatifsyed deleted the aatifsyed/refactor-api-info branch May 2, 2024 10:27
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