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

node/test: fix incorrect control flow in governed assets test #4079

Merged

Conversation

johnsaigle
Copy link
Contributor

The control flow for this function should be continue rather than return, otherwise the entire test will exit early when evaluating an ignored chain rather than skip the current iteration as intended.

In practice, this test just so happened to work OK because:

  • the only ignored chain is Wormchain with ID 3104
  • 3104 is the last entry in the slice
  • iteration over slices is deterministic

And so the test always returned early when hitting Wormchain, but Wormchain is the last item in the list.

The control flow for this function should be `continue` rather than
`return`, otherwise the entire test will exit early when evaluating an
ignored chain rather than skip the current iteration as intended.

In practice, this test just so happened to work OK because:
- the only ignored chain is Wormchain with ID 3104
- 3104 is the last entry in the slice
- iteration over slices is deterministic
And so the test always returned early when hitting Wormchain, but
Wormchain is the last item in the list.
@evan-gray evan-gray merged commit 31a9a3e into wormhole-foundation:main Aug 16, 2024
24 checks passed
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.

4 participants