Skip to content

dot/rpc: implement chain_subscribeFinalizedHeads RPC method#1140

Merged
noot merged 11 commits intodevelopmentfrom
ed/polkadot_finalized
Oct 29, 2020
Merged

dot/rpc: implement chain_subscribeFinalizedHeads RPC method#1140
noot merged 11 commits intodevelopmentfrom
ed/polkadot_finalized

Conversation

@edwardmack
Copy link
Copy Markdown
Contributor

@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
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.

looks good, please add a test!

@edwardmack
Copy link
Copy Markdown
Contributor Author

I've added testing for websockets.

"--basepath", node.basePath,
"--rpchost", HOSTNAME,
"--rpcport", node.RPCPort,
"--rpcmods", "system,author,chain,state",
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.

add dev here?

map[string](interface{}){
"subscription": float64(1),
"result": map[string](interface{}){
"number": "0x04",
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.

is there a reason the expected block is block 4?

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.

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