-
Notifications
You must be signed in to change notification settings - Fork 190
Conversation
* version from config * `listening` and `peerCount` API
👍 |
ethereum/api.go
Outdated
} | ||
|
||
// Listening returns an indication if the node is listening for network connections. | ||
func (s *NetRPCService) Listening() bool { |
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 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 { |
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 stick to n *NetRPCService
instead of s *NetRPCService
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.
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?
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.
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
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.
I used s *
as service
.
fixed |
NetRPCService service:
--networkid
)listening
andpeerCount
APIIssue: #74