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: RpcError and RpcResult and TransportError and TransportResult #28

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

prestwich
Copy link
Member

No description provided.

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

LGTM functionality wise. When should a dev think about RpcResult vs TransportResult?

Comment on lines +34 to +35
//! - [`RpcResult`] - A result modeling an Rpc outcome as `Result<T,
//! RpcError<E>>`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//! - [`RpcResult`] - A result modeling an Rpc outcome as `Result<T,
//! RpcError<E>>`.
//! - [`RpcResult`] - A result modeling an Rpc outcome as `Result<T, RpcError<E>>`.

@@ -197,7 +186,7 @@ impl<T: Transport + Clone + Send + Sync> Provider<T> {
block_count: U256,
last_block: B,
reward_percentiles: &[f64],
) -> RpcResult<FeeHistory, Box<RawValue>, TransportError>
) -> TransportResult<FeeHistory>
Copy link
Member

Choose a reason for hiding this comment

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

should we just import it as Result, I find it a bit confusing that we're talking Provider but there's mentions of Transport?

@onbjerg onbjerg mentioned this pull request Nov 17, 2023
3 tasks
@prestwich prestwich merged commit b530c78 into main Nov 17, 2023
17 checks passed
@DaniPopes DaniPopes deleted the prestwich/new-new-rpc-result branch March 11, 2024 16:12
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.

2 participants