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: implement chain_subscribeFinalizedHeads RPC method #1140

Merged
merged 11 commits into from
Oct 29, 2020

Conversation

edwardmack
Copy link
Member

@edwardmack edwardmack commented Oct 16, 2020

Changes

  • Implement chain_subscribeFinalizedHeads RPC method which is used by polkadot.js.

Tests

go test ./dot/rpc/...

Checklist

  • I have read CODE_OF_CONDUCT and CONTRIBUTING
  • I have provided as much information as possible and necessary
  • I have reviewed my own pull request before requesting a review
  • 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.

looks good, please add a test!

@edwardmack
Copy link
Member Author

I've added testing for websockets.

"--basepath", node.basePath,
"--rpchost", HOSTNAME,
"--rpcport", node.RPCPort,
"--rpcmods", "system,author,chain,state",
Copy link
Contributor

Choose a reason for hiding this comment

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

add dev here?

map[string](interface{}){
"subscription": float64(1),
"result": map[string](interface{}){
"number": "0x04",
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason the expected block is block 4?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, 1 makes more sense, I've updated this.

@noot noot merged commit 99abf5c into development Oct 29, 2020
@noot noot deleted the ed/polkadot_finalized branch October 29, 2020 00:23
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.

polkadot.js api not receiving messages from chain.subscribeFinalizedHeads
2 participants