-
Notifications
You must be signed in to change notification settings - Fork 472
parity_netPeers function #196
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
Conversation
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.
Sorry I think I merged #194 to eagerly :) Can you also add a test for this?
@@ -36,6 +36,11 @@ impl<T: Transport> Net<T> { | |||
CallFuture::new(self.transport.execute("net_peerCount", vec![])) | |||
} | |||
|
|||
/// Returns list of connected nodes parity | |||
pub fn parity_peer_list(&self) -> CallFuture<PeerType, T::Out>{ |
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.
Let's move this to parity_
namespace then
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.
will do! :) I think it's ParitySet
? Didn't realize you gave these instructions. Asked if i had the go ahead on #198
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.
Sounds good!
//! Type of node (Parity, Geth...) | ||
|
||
/// specify behavior of node interacting with | ||
pub enum NodeType { |
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 doesn't seem required now
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
pub struct PeerProtocolsInfo { |
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.
More docs
geth returns a different structure. believe it is of type HashMap. thought this would be a simpler/better alternative atm until i have time to do some digging through geth's source. will setup a seperate func for geth. hope the naming scheme is ok.
func parity_peer_list
andfunc geth_peer_list
.