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

Don't publish deal sealing status update if no one is subscribed #401

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Apr 1, 2022

No description provided.

@dirkmc dirkmc force-pushed the feat/deal-seal-state-subs branch from 2de2754 to 754bf74 Compare April 1, 2022 14:45
}

func (s *updatesSubscription) Close() error {
Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 Apr 4, 2022

Choose a reason for hiding this comment

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

Do we call this close when the deal is no longer in the first 10 deals on the UI ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's called when the front end stops subscribing to events.
This can happen because

  • the user closes the web page
  • a new deal comes in that moves the last deal on the page to page 2 (ie no longer visible)

Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

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

some nits.

@dirkmc dirkmc merged commit 186418a into feat/deal-seal-state Apr 4, 2022
@dirkmc dirkmc deleted the feat/deal-seal-state-subs branch April 4, 2022 09:43
dirkmc added a commit that referenced this pull request Apr 4, 2022
* feat: update UI when deal sealing state changes

* Don't publish deal sealing status update if no one is subscribed (#401)

* feat: dont check seal status change if no one is subscribed to events

* refactor: rename to make subscription name clearer

* feat: test that Proving event is fired when sealer reaches that state
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