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

[WIP] improve(SpokePoolClient): Support restart of failed listener #1721

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pxrl
Copy link
Contributor

@pxrl pxrl commented Jul 30, 2024

In the event that a child process terminates improperly, support restarting it with its initial lookback.

In the event that a child process terminates improperly, support
restarting it with its initial lookback.
@pxrl pxrl changed the title improve(SpokePoolClient): Support restart of failed listener [WIP] improve(SpokePoolClient): Support restart of failed listener Jul 30, 2024
@pxrl pxrl marked this pull request as draft July 30, 2024 23:04
});

// Flush all ingested deposits to protect against re-org.
// xxx this probably belongs upstream in a `protected SpokePoolClient.init()` method
Copy link
Member

Choose a reason for hiding this comment

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

agreed with putting this into init() to avoid any missed line items

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Comment on lines +125 to +127
// xxx this probably belongs upstream in a `protected SpokePoolClient.init()` method
// that is called in the constructor, such that it can be re-called by this method to
// re-initialise the same defaults.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will upstream this to the SDK.

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

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

approving for you to merge quickly if needed

@pxrl
Copy link
Contributor Author

pxrl commented Jul 30, 2024

approving for you to merge quickly if needed

👍 There's no burning need for it right now, but it's going to be important as we add more chains with more questionable websocket reliability. I'll upstream the init method first and then will circle back to this one.

* @returns void
*/
protected childExit(code?: number, signal?: string): void {
if (code === 0) {
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 any system defined constants (like EXIT_SUCCESS in the stdlib for C) that we can use instead of 0?

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.

3 participants