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

Move current block stream into ethrpc #1820

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Conversation

MartinquaXD
Copy link
Contributor

The overall idea is to move block streams and event streams into the ethrpc crate. This PR takes care of the current_block stream.

Note that the files shared::ethrpc and shared::current_block still exist but they only contain the CLI logic.
In a follow up refactoring it would make sense to move that last remaining logic into shared::arguments.

Test Plan

Only moved code around so the e2e tests should be enough.

@MartinquaXD MartinquaXD requested a review from a team as a code owner August 29, 2023 07:01
}

#[async_trait::async_trait]
impl BlockRetrieving for Web3 {
Copy link
Contributor

@nlordell nlordell Aug 29, 2023

Choose a reason for hiding this comment

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

We can get rid of the BlockRetrieving trait and move this into the retriever module right?

Note: I would do that refactor in a follow up to keep this PR purely about moving code around.

Copy link
Contributor Author

@MartinquaXD MartinquaXD Aug 29, 2023

Choose a reason for hiding this comment

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

Yep. Also had a few other refactoring ideas but wanted to do them in a separate PR as well. 👌

/// Command line arguments for creating global block stream.
#[derive(Debug, Parser)]
#[group(skip)]
pub struct Arguments {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe move this to shared::arguments::Arguments?

Copy link
Contributor Author

@MartinquaXD MartinquaXD Aug 29, 2023

Choose a reason for hiding this comment

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

Initially I wanted to do that together with moving ethrpc arguments because I forgot that last time (see PR description). But I can do that now as well.

Copy link
Contributor

@nlordell nlordell Aug 29, 2023

Choose a reason for hiding this comment

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

Follow up is fine. Should should have RTFPRD.

Copy link
Contributor

@fleupold fleupold left a comment

Choose a reason for hiding this comment

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

Assuming no logic changes

🧹

@MartinquaXD MartinquaXD enabled auto-merge (squash) August 29, 2023 12:35
@MartinquaXD MartinquaXD merged commit 64ad56f into main Aug 29, 2023
7 checks passed
@MartinquaXD MartinquaXD deleted the move-current-block-stream branch August 29, 2023 12:42
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants