Skip to content
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

Merged
merged 6 commits into from
May 25, 2020

Conversation

edwardmack
Copy link
Member

Changes

Tests:

go test ./dot/rpc/...
go test ./dot/network/...

Checklist:

  • I have read CONTRIBUTING and CODE_OF_CONDUCT
  • I have provided as much information as possible and necessary
  • I have reviewed my own pull request before requesting a review
  • I have linked any relevant issues in my pull request comments
  • All integration tests and required coverage checks are passing

Issues:

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

nice work!

Copy link
Contributor

@ryanchristo ryanchristo left a 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.
Copy link
Contributor

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.

Copy link
Member Author

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.

@edwardmack edwardmack merged commit 6089cec into development May 25, 2020
@edwardmack edwardmack deleted the ed/rpc-system_nodeRoles branch May 25, 2020 14:17
ryanchristo pushed a commit that referenced this pull request Jun 24, 2020
* implement system_nodeRoles RPC

* add tests

* update rpc service_test.go

* update error checking
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.

4 participants