Skip to content

dot/rpc, dot/network: Implement RPC system_nodeRoles #880

Merged
edwardmack merged 6 commits intodevelopmentfrom
ed/rpc-system_nodeRoles
May 25, 2020
Merged

dot/rpc, dot/network: Implement RPC system_nodeRoles #880
edwardmack merged 6 commits intodevelopmentfrom
ed/rpc-system_nodeRoles

Conversation

@edwardmack
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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.

Comment thread dot/network/service.go
return peers
}

// NodeRoles Returns the roles the node is running as.
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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