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

check if node exists in genesis config before setting destination shard #2097

Merged
merged 4 commits into from
Jul 12, 2020

Conversation

bogdan-rosianu
Copy link
Contributor

fixed the situation where if an entire testnet started with the same prefs.toml file and it's value of DestinationShardAsObserver would have not been set to disabled then all the nodes joined as observers in that shard.

@bogdan-rosianu bogdan-rosianu self-assigned this Jul 12, 2020
@@ -264,7 +265,10 @@ func (e *epochStartBootstrap) prepareEpochZero() (Parameters, error) {
return Parameters{}, err
}

shardIDToReturn := e.applyShardIDAsObserverIfNeeded(e.genesisShardCoordinator.SelfId())
shardIDToReturn := e.genesisShardCoordinator.SelfId()
if !e.isNodeInGenesisNodesConfig() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a unit test for this :) ? good find.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. added 2 unit tests

@iulianpascalau iulianpascalau self-requested a review July 12, 2020 17:28
Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 8b66689 into development Jul 12, 2020
@LucianMincu LucianMincu deleted the fix-shard-0-when-setting-dest-observer-shard branch July 12, 2020 22:01
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.

None yet

4 participants