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

Improve validator shutdown test #8600

Merged
merged 5 commits into from
Feb 24, 2023
Merged

Improve validator shutdown test #8600

merged 5 commits into from
Feb 24, 2023

Conversation

mystenmark
Copy link
Contributor

Instead of expecting a simple panic, we check that a validator that no longer supports the current protocol version shuts itself down.

@vercel
Copy link

vercel bot commented Feb 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated
explorer ⬜️ Ignored (Inspect) Feb 24, 2023 at 10:40PM (UTC)
explorer-storybook ⬜️ Ignored (Inspect) Feb 24, 2023 at 10:40PM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Feb 24, 2023 at 10:40PM (UTC)

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

Seems reasonable!

Comment on lines 108 to 110
assert!(!v.is_running());
} else {
assert!(v.is_running());
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, can you add a message to the asserts to identify each validator, in case it fails, to help track down what happened?

Comment on lines 76 to 77
.map(|c| c.is_alive())
.unwrap_or(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: map_or_else?

Suggested change
.map(|c| c.is_alive())
.unwrap_or(false)
.map_or(false, |c| c.is_alive())

@mystenmark mystenmark merged commit b571878 into main Feb 24, 2023
@mystenmark mystenmark deleted the mlogan-test-shutdown branch February 24, 2023 23:20
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