Skip to content

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

Closed
wants to merge 4 commits into from

Conversation

blanksteer
Copy link
Contributor

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 and func geth_peer_list.

Copy link
Owner

@tomusdrw tomusdrw left a 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>{
Copy link
Owner

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

Copy link
Contributor Author

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

Copy link
Owner

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 {
Copy link
Owner

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 {
Copy link
Owner

Choose a reason for hiding this comment

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

More docs

@tomusdrw tomusdrw changed the title Blank parityonly peer parity_netPeers function Feb 13, 2019
@blanksteer blanksteer closed this Mar 13, 2019
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.

2 participants