Skip to content

Make sync tests not to propagate transactions#1981

Merged
majecty merged 1 commit intoCodeChain-io:masterfrom
majecty:f/fix-sync-test
Aug 10, 2020
Merged

Make sync tests not to propagate transactions#1981
majecty merged 1 commit intoCodeChain-io:masterfrom
majecty:f/fix-sync-test

Conversation

@majecty
Copy link

@majecty majecty commented Aug 6, 2020

The current CodeChain master does not fail the tests without this commit.
However, #1979 fails the tests quite often without this PR.

These tests use solo consensus. To generate a block with the solo
consensus, there should be a transaction. These tests send a
transaction to a node to make a block. Then the node propagates the
generated block to other nodes. These tests then check the other nodes
whether the received the block or not.

However, if the transaction is propagated before the block, these
tests fail. If the transaction is propagated, other nodes will
generate their own blocks. Then they will reject the block that the
first node generated.

These tests use solo consensus. To generate a block with the solo
consensus, there should be a transaction. These tests send a
transaction to a node to make a block. Then the node propagates the
generated block to other nodes. These tests then check the other nodes
whether the received the block or not.

However, if the transaction is propagated before the block, these
tests fail. If the transaction is propagated, other nodes will
generate their own blocks. Then they will reject the block that the
first node generated.
@majecty majecty added the test label Aug 6, 2020
@majecty majecty requested review from junha1 and sgkim126 August 6, 2020 07:28
@junha1
Copy link
Contributor

junha1 commented Aug 6, 2020

So if there is no transaction, solo consensus never generate a block?

@majecty
Copy link
Author

majecty commented Aug 6, 2020

@junha1 Yes it is. As far as I know, solo only generates a block when a transaction is sent.

@majecty majecty merged commit 8ed108f into CodeChain-io:master Aug 10, 2020
@majecty majecty deleted the f/fix-sync-test branch August 10, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants