-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add Web3 namespace RPC handler #990
Conversation
Codecov Report
@@ Coverage Diff @@
## main #990 +/- ##
==========================================
+ Coverage 74.01% 74.08% +0.07%
==========================================
Files 294 298 +4
Lines 32564 32818 +254
==========================================
+ Hits 24102 24314 +212
- Misses 8462 8504 +42
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
there's no need for an additional client_version
field, we should to reuse the client_version
of the SessionManager.HelloMessage
this is also already included in the NetworkStatus
, should probably rename the field from client_name
to client_version
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.
awesome, only 1 nit, re #993 that was just merged
let status = self.get_status().await?; | ||
|
||
Ok(NetworkStatus { | ||
client_name: "Reth".to_string(), | ||
client_version: "Reth".to_string(), |
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.
this should actually be included in the fn get_status
do you want to modify the fn get_status
in a followup, so that it returns NetworkStatus
instead?
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.
Can you elaborate? Not sure to get what is needed
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.
Network:: get_status
reth/crates/net/network/src/network.rs
Lines 132 to 137 in def59c3
/// Get the current status of the node. | |
pub async fn get_status(&self) -> Result<Status, oneshot::error::RecvError> { | |
let (tx, rx) = oneshot::channel(); | |
let _ = self.manager().send(NetworkHandleMessage::GetStatus(tx)); | |
rx.await | |
} |
should return NetworkStatus
directly
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.
created #996
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.
lgtm
Closes #983