Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Add AT to ensure 0-miner Clique/IBFT are valid #1525

Merged
merged 3 commits into from
Jun 4, 2019

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Jun 4, 2019

No description provided.

@rain-on rain-on requested review from jframe and CjHare and removed request for jframe June 4, 2019 06:59

@Test
public void startingWithZeroValidatorsProducesValidCluster() throws IOException {
final String[] validators = {""};
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just {} as is done for the ibft test?

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.

public class CliqueZeroValidators extends AcceptanceTestBase {

@Test
public void startingWithZeroValidatorsProducesValidCluster() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps use shorter test name "zeroValidatorsFormValidCluster" that was used in the Clique test

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.

final PantheonNode node2 = pantheon.createCliqueNodeWithValidators("node2", validators);
cluster.start(node1, node2);

node1.verify(net.awaitPeerCount(1));
Copy link
Contributor

Choose a reason for hiding this comment

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

should validate both nodes have correct peer count, so cluster.verify(net.awaitPeerCount(1))

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.


cluster.start(node1, node2);

node1.verify(net.awaitPeerCount(1));
Copy link
Contributor

Choose a reason for hiding this comment

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

should validate both nodes have correct peer count, so cluster.verify(net.awaitPeerCount(1))

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.

@rain-on rain-on merged commit 223c374 into PegaSysEng:master Jun 4, 2019
@rain-on rain-on deleted the invalid_at branch June 4, 2019 23:22
iikirilov pushed a commit to Puneetha17/pantheon that referenced this pull request Jun 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants