-
Notifications
You must be signed in to change notification settings - Fork 117
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
dot/rpc, dot/network: Implement RPC system_nodeRoles #880
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.
nice work!
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.
Looking good. One question/thought.
@@ -410,3 +410,8 @@ func (s *Service) Peers() []common.PeerInfo { | |||
} | |||
return peers | |||
} | |||
|
|||
// NodeRoles Returns the roles the node is running as. |
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 think this should be part of the core service rather than the network service? maybe? we pass this configuration value down from the dot configuration to the core and network services and the network service is less the source of truth for this sort of thing than core but probably ok as is - kinda just thinking this out loud.
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'd like to leave this as is for now. I agree it makes sense to include this in core, however the RPC module that's using this doesn't have reference to coreAPI, it currently has access to networkAPI and systemAPI.
* implement system_nodeRoles RPC * add tests * update rpc service_test.go * update error checking
Changes
Tests:
Checklist:
Issues: