Skip to content

chore(l1): drop unwraps from rpc crate #3075

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

Merged
merged 10 commits into from
Jun 10, 2025
Merged

chore(l1): drop unwraps from rpc crate #3075

merged 10 commits into from
Jun 10, 2025

Conversation

cdiielsi
Copy link
Contributor

@cdiielsi cdiielsi commented Jun 6, 2025

Motivation

Dissallow unwraps on l1.

Description

This pr drops unwraps on crate rpc in networking. Test's unwraps remain. Resolves partially #2879

Copy link

github-actions bot commented Jun 6, 2025

Lines of code report

Total lines added: 21
Total lines removed: 2
Total lines changed: 23

Detailed view
+-------------------------------------------------------+-------+------+
| File                                                  | Lines | Diff |
+-------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                     | 337   | -2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/beacon/errors.rs | 13    | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/beacon/mod.rs    | 73    | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/l2/transaction.rs        | 223   | +4   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs                   | 586   | +12  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/utils.rs                 | 384   | +1   |
+-------------------------------------------------------+-------+------+

@cdiielsi cdiielsi marked this pull request as ready for review June 9, 2025 16:21
@cdiielsi cdiielsi requested a review from a team as a code owner June 9, 2025 16:21
let response =
self.client
.get(self.url.clone().join(endpoint).map_err(|_| {
BeaconClientError::Custom("Failed to set url endpoint".to_string())
Copy link
Contributor

Choose a reason for hiding this comment

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

may be add a new error type ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor

@SDartayet SDartayet left a comment

Choose a reason for hiding this comment

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

LGTM!

@mpaulucci mpaulucci changed the title feat(l1): drop unwraps from rpc crate chore(l1): drop unwraps from rpc crate Jun 10, 2025
@cdiielsi cdiielsi added this pull request to the merge queue Jun 10, 2025
Merged via the queue into main with commit 2cf8c9e Jun 10, 2025
22 checks passed
@cdiielsi cdiielsi deleted the drop-unwraps-rpc branch June 10, 2025 14: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.

3 participants