Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Pull Genesis parsing out of state #2284
Pull Genesis parsing out of state #2284
Changes from all commits
2d2eac2
f599f94
47f3496
3da37dc
317cb83
d929504
37f2130
3eba6b7
b61fa88
b5dd88a
18b101f
1d8437d
e4c3328
dfe422c
0bc87ac
64bfb9f
1a72930
f4e28c2
19a9fd5
80ad266
e0ab6c8
2a4ba56
c3fef3a
bc0b84f
9efc31d
1362114
b9c227a
5db63ac
2bbe45a
3e1890c
e2aaa5e
ab1cd0b
f87a7e4
19cf59d
afc5b39
b30633d
f56646b
267dfa4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We initialize
genesisNodeIDs
ininit()
, so I think it would make sense for us to also initialize them here as well. Maybe we can move that blob of code down here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then what if we write a test that does not really use the environment? The genesisNodeIDs content would change depending on the order tests are executed right?
This is the reason I'd keep them in the init,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually didn't reailze we have a lot of genesis helpers to create pre-funded genesis. Wondering if it makes sense for us to consolidate this into a single place somewhere and export it out of a package. It could be something like:
I'm not sure what package i'd put his in. Maybe we can make a package like
genesis/test
or put this inplatformvm
somewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I do in #2107 for genesis helpers and subsequent PRs for other test helpers.
Sorry we got the code duplication here, just trying to segment changes limit PRs scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also historically, duplication arised when I repackaged platformvm but the way test parameters were set were slightly different across packaged. #2107 and subsequent PR remove duplicated code and fixes test to make them work with the default values and not ony with the specific values used in different packages.