[GENESIS] Make camino part of genesis fully optional #366
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.
Why this should be merged
In genesis json we have
camino
field which contains camino-specific data. Initial idea was that we'll keep all avax logic and introduce our own in addition to that, so both camino and avax tests can work with existing code. But there are still still some inconsistency in that.If we'll try to run node with custom genesis json, which doesn't have
camino
field at all, like normal avax genesis, genesis parsing will fail cause of invalid initial admin address. This PR solves it by making wholecamino
field logic optional.How this works
Make
camino
field pointer, so default value will be nil. Check for not nil before doing something with this field.How this was tested
Existing unit-tests and e2e tests.
Manual start of local node with custom genesis without camino field.
Additional references
Original PR based on cortina-7 dev
#307