feat: dot/rpc: Add support for submit and watch extrinisic#1415
Merged
edwardmack merged 32 commits intodevelopmentfrom Mar 12, 2021
Merged
feat: dot/rpc: Add support for submit and watch extrinisic#1415edwardmack merged 32 commits intodevelopmentfrom
edwardmack merged 32 commits intodevelopmentfrom
Conversation
|
This pull request introduces 1 alert when merging a066327 into f9a40ff - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging 276e61b into 7f506cf - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging b03cde1 into 451474b - view on LGTM.com new alerts:
|
RyRy79261
approved these changes
Mar 12, 2021
arijitAD
approved these changes
Mar 12, 2021
noot
reviewed
Mar 12, 2021
noot
reviewed
Mar 12, 2021
dot/rpc/websocket.go
Outdated
| return c.wsconn.WriteJSON(msg) | ||
| err := c.wsconn.WriteJSON(msg) | ||
| if err != nil { | ||
| logger.Warn("error sending websocket message", "error", err) |
Contributor
There was a problem hiding this comment.
I wonder if this should be warn or debug, since warn will pollute the logs if there's some issue... what do you think?
noot
reviewed
Mar 12, 2021
dot/rpc/websocket.go
Outdated
| return c.wsconn.WriteJSON(res) | ||
| err := c.wsconn.WriteJSON(res) | ||
| if err != nil { | ||
| logger.Warn("error sending websocket message", "error", err) |
noot
reviewed
Mar 12, 2021
| } | ||
|
|
||
| // ExtrinsicSubmitListener to handle listening for extrinsic events | ||
| type ExtrinsicSubmitListener struct { |
Contributor
There was a problem hiding this comment.
maybe this and the related logic could go into another file?
Contributor
Author
There was a problem hiding this comment.
Yes, I was thinking I should move the listener logic into another file, I'll clean-up in another PR.
noot
approved these changes
Mar 12, 2021
github-actions bot
pushed a commit
that referenced
this pull request
Mar 12, 2021
Edward Mack: feat: dot/rpc: Add support for submit and watch extrinisic (#1415) * add check for call to websocket * stub rpc author_submitAndWatchExtrinsic * add block import listener * implement state_subscribeRuntimeVersion * add test for apply extrinsic * implement inBlock status for author_submitAndWatchExtrinsic * handle submit extrinsic in HandleSubmittedExtrinsic * remove print lines * add unit tests * add tests for apply extrinsic * add test to build and apply extrinsic * add tests * add subkey to tests.yml * fix SubscriptionParams parameter * skip test failing in CI due to subkey setup * remove unused reference * address comments * remove unused comments * change logging level for websocket issues
This was referenced Oct 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Tests
I need to build tests, any suggestions on how I can init a test so that submit extrinsic I can follow it through all the steps.
Checklist
Issues