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

Fix syncing websocket subscriptions #630

Merged

Conversation

tgmichel
Copy link
Contributor

@tgmichel tgmichel commented Apr 8, 2022

This PR adds missing information to the syncing subscriptions and fixes the behaviour to match what is documented in the web3js library.

Changes:

  • Serialize response either as a boolean (on syncing false) or an object describing the syncing progress (on syncing true).
  • Return syncing status on subscription instead of always depending on import notifications.
  • If the node was major syncing on subscription, rely on import notification to emit an additional notification when the node is not major syncing anymore.

@tgmichel tgmichel marked this pull request as ready for review April 11, 2022 07:18
@tgmichel tgmichel requested a review from sorpaas as a code owner April 11, 2022 07:18
@tgmichel tgmichel requested a review from sorpaas April 21, 2022 08:03
@sorpaas sorpaas merged commit 7829b04 into polkadot-evm:master Apr 25, 2022
@tgmichel tgmichel deleted the tgm-pubsub-syncing-rev branch June 24, 2022 07:41
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Fix `syncing` websocket subscriptions

* fmt

* Copyright year
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.

2 participants