diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-09-13 17:30:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 17:30:42 +0800 |
commit | ce3e7931016bb5f3a68e1b27e308bb54522b34a4 (patch) | |
tree | 56ff2ec31a1c8dfcdad80772815de75438f29a79 /core/agreement-state_test.go | |
parent | 41f4c2fd789d6b58ca076e675b2ce931aaedb37b (diff) | |
download | tangerine-consensus-ce3e7931016bb5f3a68e1b27e308bb54522b34a4.tar.gz tangerine-consensus-ce3e7931016bb5f3a68e1b27e308bb54522b34a4.tar.zst tangerine-consensus-ce3e7931016bb5f3a68e1b27e308bb54522b34a4.zip |
core: Fix BA Fork issues (#104)
Diffstat (limited to 'core/agreement-state_test.go')
-rw-r--r-- | core/agreement-state_test.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/core/agreement-state_test.go b/core/agreement-state_test.go index 1591625..bc8dc8e 100644 --- a/core/agreement-state_test.go +++ b/core/agreement-state_test.go @@ -151,9 +151,6 @@ func (s *AgreementStateTestSuite) TestPrepareState() { newState, err = state.nextState() s.Require().Nil(err) - s.Require().True(len(s.blockChan) > 0) - hash := <-s.blockChan - s.Equal(proposedBlock, hash) s.Equal(stateAck, newState.state()) // For period >= 2, if the pass-vote for block v not equal to {} @@ -172,9 +169,6 @@ func (s *AgreementStateTestSuite) TestPrepareState() { newState, err = state.nextState() s.Require().Nil(err) - s.Require().True(len(s.blockChan) > 0) - hash = <-s.blockChan - s.Equal(block.Hash, hash) s.Equal(stateAck, newState.state()) } @@ -382,10 +376,6 @@ func (s *AgreementStateTestSuite) TestPass2State() { s.Require().Nil(a.processVote(vote)) } s.Require().Nil(state.receiveVote()) - s.Require().True(len(s.voteChan) > 0) - vote := <-s.voteChan - s.Equal(types.VotePass, vote.Type) - s.Equal(block.Hash, vote.BlockHash) // Only propose one vote. s.Require().Nil(state.receiveVote()) s.Require().True(len(s.voteChan) == 0) @@ -400,14 +390,9 @@ func (s *AgreementStateTestSuite) TestPass2State() { vote := s.prepareVote(vID, types.VotePass, common.Hash{}, 1) s.Require().Nil(a.processVote(vote)) } - vote = s.prepareVote(s.ID, types.VoteAck, common.Hash{}, 2) + vote := s.prepareVote(s.ID, types.VoteAck, common.Hash{}, 2) s.Require().Nil(a.processVote(vote)) s.Require().Nil(state.receiveVote()) - s.Require().True(len(s.voteChan) > 0) - vote = <-s.voteChan - s.Equal(types.VotePass, vote.Type) - s.Equal(common.Hash{}, vote.BlockHash) - // Test terminate. ok := make(chan struct{}) go func() { |