Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

NetRPCService service #81

Merged
merged 3 commits into from
May 15, 2017
Merged

Conversation

ramilexe
Copy link
Contributor

NetRPCService service:

  • version from config (--networkid)
  • listening and peerCount API

image

Issue: #74

* version from config
* `listening` and `peerCount` API
@illya13
Copy link
Contributor

illya13 commented May 11, 2017

👍

ethereum/api.go Outdated
}

// Listening returns an indication if the node is listening for network connections.
func (s *NetRPCService) Listening() bool {

Choose a reason for hiding this comment

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

Let's stick to n *NetRPCService instead of s *NetRPCService

ethereum/api.go Outdated
}

// PeerCount returns the number of connected peers
func (s *NetRPCService) PeerCount() hexutil.Uint {

Choose a reason for hiding this comment

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

Let's stick to n *NetRPCService instead of s *NetRPCService

Choose a reason for hiding this comment

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

Is there a reason why you want to return 0 here, because it appears that we aren't using the function anywhere, so why not just remove it?

Copy link
Member

Choose a reason for hiding this comment

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

Its to expose it over the RPC. Do we know of any tool that requires it, like truffle needed Version ? I think it makes sense to just let it be 0, since we aren't connected ever to any eth peers.

So this looks good, but let's be consistent with n * vs s * in the receiver

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used s * as service.

@ramilexe
Copy link
Contributor Author

fixed

@adrianbrink adrianbrink merged commit 5a2be3c into cosmos:develop May 15, 2017
@ramilexe ramilexe deleted the network_version branch June 1, 2017 21:00
adrianbrink added a commit that referenced this pull request Aug 14, 2017
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.

4 participants