-
Notifications
You must be signed in to change notification settings - Fork 83
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
Conversation
} | ||
|
||
#[async_trait::async_trait] | ||
impl BlockRetrieving for Web3 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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
🧹
The overall idea is to move block streams and event streams into the
ethrpc
crate. This PR takes care of thecurrent_block
stream.Note that the files
shared::ethrpc
andshared::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.